Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when the user needs to install a workload #18119

Closed
danroth27 opened this issue Jun 5, 2021 · 3 comments
Closed

Improve error message when the user needs to install a workload #18119

danroth27 opened this issue Jun 5, 2021 · 3 comments
Labels
Area-Workloads untriaged Request triage from a team member

Comments

@danroth27
Copy link
Member

If you try to do an action that requires a workload to be installed, you get a rather unhelpful error message that tells you the IDs of the missing workload packs, but not the actual package IDs or install command that you need to run to install the workload:

C:\Program Files\dotnet\sdk\6.0.100-preview.4.21255.9\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(24,5): error NETSDK1147: The following workload packs were not installed: Microsoft.NET.Runtime.MonoAOTCompiler.Task Microsoft.NET.Runtime.WebAssembly.Sdk Microsoft.Netcore.App.Runtime.Aot.Cross.browser-wasm Microsoft.NET.Runtime.Emscripten.Python Microsoft.NET.Runtime.Emscripten.Node Microsoft.NET.Runtime.Emscripten.Sdk [C:\Users\WDAGUtilityAccount\Desktop\PictureFixer-main\PictureFixer\Client\PictureFixer.Client.csproj]

It's not clear how the user is supposed to figure out what to do to acquire these missing workload packs.

@KathleenDollard @marcpopMSFT @mhutch

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Jun 5, 2021
@mhutch
Copy link
Member

mhutch commented Jun 8, 2021

It should be suggesting a workload that provides the missing packs /cc @dsplaisted

@dsplaisted
Copy link
Member

This should be fixed in Preview 5 with #17512

The errors now look like this:

c:\git\dotnet-sdk2\artifacts\bin\redist\Debug\dotnet\sdk\6.0.100-dev\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(33,5): error NETSDK1147: To build this project, the following workloads must be installed: microsoft-android-sdk-full [c:\git\dotnet-sdk2\artifacts\tmp\Debug\It_should_fai---14415423\WorkloadTest\WorkloadTest.csproj]
c:\git\dotnet-sdk2\artifacts\bin\redist\Debug\dotnet\sdk\6.0.100-dev\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(33,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload install microsoft-android-sdk-full [c:\git\dotnet-sdk2\artifacts\tmp\Debug\It_should_fai---14415423\WorkloadTest\WorkloadTest.csproj]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants