Skip to content

dotnet workload install prints NRE #17410

@jonathanpeppers

Description

@jonathanpeppers

Using .NET 6.0.100-preview.4.21253.14:

> dotnet workload install microsoft-android-sdk-full --configfile NuGet.config

The command "works", in that everything is installed, but it prints an error at the end and gives a failing exit code:

Garbage collecting for SDK feature bands 6.0.100...
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.IsSingleFilePack(PackInfo packInfo) in dotnet.dll:token 0x60001c9+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.PackIsInstalled(PackInfo packInfo) in dotnet.dll:token 0x60001c3+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.DeletePack(PackInfo packInfo) in dotnet.dll:token 0x60001c4+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.GarbageCollectInstalledWorkloadPacks() in dotnet.dll:token 0x60001c0+0x151
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.InstallWorkloads(IEnumerable`1 workloadIds, Boolean skipManifestUpdate) in dotnet.dll:token 0x60001ce+0x81
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.Execute() in dotnet.dll:token 0x60001cb+0x216
   at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args) in dotnet.dll:token 0x60008af+0x5e
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.Run(String[] args) in dotnet.dll:token 0x6000145+0x6
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) in dotnet.dll:token 0x6000918+0x2e8
   at Microsoft.DotNet.Cli.Program.Main(String[] args) in dotnet.dll:token 0x6000916+0x6f

Even though this error appeared, I can build/deploy/run Android projects. So this must be something going wrong at the very end of workload install.

Full log: log.txt

Config file was: https://github.com/dotnet/net6-mobile-samples/blob/ad4980b9f818486106842fd596f6bc59e6963f9f/NuGet.config

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions