question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong "workload not found" message

See original GitHub issue

Describe the bug

When trying to build a project without any workloads for .NET Multi-platform App UI (MAUI) , the build process fails with an error related to “maui-tizen” even though it is not required for the current project.

To Reproduce

  • Create a new project in .NET MAUI that does not require maui-tizen workload.
  • Attempt to build the project without maui workload installed
  • Observe that the build process fails with an error related to “maui-tizen” even though it is not necessary for the project.

repo: https://github.com/rmarinho/DotNetTestTizen

Exceptions (if any)

To build this project, the following workloads must be installed: maui-tizen
To install these workloads, run the following command: dotnet workload restore

binlog : test-2.binlog.zip

Expected Result: The build process should throw a error saying maui workload needs to be installed.

Further technical details

  • running on macOS Monterey

 Version:   7.0.202
 Commit:    6c74320bc3

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  12.6
 OS Platform: Darwin
 RID:         osx.12-x64
 Base Path:   /Users/runner/hostedtoolcache/dotnet/sdk/7.0.202/

Host:
  Version:      7.0.4
  Architecture: x64
  Commit:       0a396acafe

.NET SDKs installed:
  7.0.202 [/Users/runner/hostedtoolcache/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.4 [/Users/runner/hostedtoolcache/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.4 [/Users/runner/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/Users/runner/hostedtoolcache/dotnet]

global.json file:
  /Users/runner/work/1/s/global.json

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Issue Analytics

  • State:open
  • Created 5 months ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dsplaistedcommented, Apr 27, 2023

The SDK doesn’t know which workload you need, just which workload packs are missing. There can be multiple workloads that would supply those packs. In this case it looks like either the Tizen or Maui workloads would install the packs that are needed, but the Tizen workload would overall install fewer additional packs, so it suggests that one.

0reactions
rmarinhocommented, Apr 27, 2023

What i don’t understand is that if i m not building for that workload, why would it throw?! if i just need Microsoft.Maui.Sdk.net7 and Microsoft.Maui.Resizetizer.Sdk for the other workloads that i specify on my csproj.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Better error message for missing workloads? · Issue #21956
Normally the error message would tell you which workload is missing. What is happening in these cases is that C:\Program Files (x86)\dotnet is ......
Read more >
NETSDK1147: Missing workload for specified target ...
In this article. This error is caused by trying to compile a project that requires an optional workload, but you don't have the...
Read more >
How to resolve Missing Workload components in Visual ...
I've been trying to get into .NET MAUI development but I've been having an uphill battle getting the workloads installed and working.
Read more >
14.1 Troubleshooting Discovery for Windows Workloads
Workload Discovery fails with error message. Could not find file output.xml. or. Network path not found. or (upon attempting to discover a Windows...
Read more >
Failed to pair to Mac with error "Could not install workload ...
The reason is that this issue is caused by a workload update. Workloads are shared by Visual Studio versions and I did not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found