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

[Bug] Workload ID maui is not recognized - Unable to find even a single workload #3099

Closed
CalaxDev opened this issue Oct 25, 2021 · 19 comments
Closed
Labels
area-setup Installation, setup, requirements, maui-check, workloads, platform support s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@CalaxDev
Copy link

CalaxDev commented Oct 25, 2021

Description

I am not able to find or install a single Workload after completely wiping every single trace of Visual Studio 2022 from my system and reinstalling VS 2022 with the maui checkbox checked

Steps to Reproduce

  1. Setup a new Machine (Hyper-V VM for example)
  2. Install VS 2022
  3. run "dotnet workload install maui" or "dotnet workload search maui"

Expected Behavior

Installs maui workload

Actual Behavior

Workload ID maui is not recognized. as well as just an empty list

Basic Information

  • Version with issue: 6.0.100-rc.2.21505.57
  • Last known good version: none
  • IDE: VS 2022
  • Affected Devices: Windows 10 PC

Screenshots

image

Freshly installed everything
image

@CalaxDev CalaxDev added the t/bug Something isn't working label Oct 25, 2021
@jsuarezruiz jsuarezruiz added the area-setup Installation, setup, requirements, maui-check, workloads, platform support label Oct 25, 2021
@TanayParikh
Copy link
Contributor

TanayParikh commented Feb 4, 2022

Getting the same with 6.0.103:

PS C:\Users\taparik\dev\maui> dotnet workload install maui
Workload ID maui is not recognized.
PS C:\Users\taparik\dev\maui> dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/main.json
Workload ID maui is not recognized.
PS C:\Users\taparik\dev\maui> dotnet workload list

This command lists only workloads that were installed via `dotnet workload install` in this version of the SDK and not those that were installed via Visual Studio.

Installed Workload Ids
----------------------

Use `dotnet workload search` to find additional workloads to install.
.NET SDK (reflecting any global.json):
 Version:   6.0.103
 Commit:    041c2d6658

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22000
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.103\

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  5.0.210 [C:\Program Files\dotnet\sdk]
  5.0.404 [C:\Program Files\dotnet\sdk]
  6.0.103 [C:\Program Files\dotnet\sdk]
  6.0.200 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

My 6.0.200 isn't working because of dotnet/sdk#23403 which is causing:

Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestCompositionException: Did not find workload manifest dependency 'Microsoft.NET.Workload.Emscripten' required by manifest 'microsoft.net.workload.mono.toolchain' [C:\Program Files\dotnet\sdk-manifests\6.0.200\microsoft.net.workload.mono.toolchain\WorkloadManifest.json]
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.ComposeWorkloadManifests()
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir)
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand..ctor(ParseResult parseResult, IReporter reporter, IWorkloadResolver workloadResolver, IInstaller workloadInstaller, INuGetPackageDownloader nugetPackageDownloader, IWorkloadManifestUpdater workloadManifestUpdater, String dotnetDir, String userProfileDir, String tempDirPath, String version, IReadOnlyCollection`1 workloadIds)
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.<get_SubCommands>b__9_0(ParseResult appliedOption)
   at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args)
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.Run(String[] args)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)

If it matters, I have a global.json to force it to use 6.0.103 instead of 6.0.200:

{
    "sdk": {
      "version": "6.0.103"
    },
    "tools": {
      "dotnet": "6.0.103"
    }
}

@Dreamescaper
Copy link

I have the same issue now. I've even tried to reinstall VS and dotnet completely.
I assume that workloads should be installed automatically with VS (when I select MAUI component), but they don't. And if I try to install MAUI workload manually - I get this issue.

@TanayParikh
Copy link
Contributor

I have the same issue now. I've even tried to reinstall VS and dotnet completely. I assume that workloads should be installed automatically with VS (when I select MAUI component), but they don't. And if I try to install MAUI workload manually - I get this issue.

Two things that helped me resolve this issue:

  1. Ensure you uninstall all the nightly SDKs (ie any version not explicitly provided by VS)
  2. Ensure you also have the UWP workload installed.

@Dreamescaper
Copy link

@TanayParikh
Didn't work for me, unfortunately. I've removed all .net versions apart from bundled with VS, installed UWP workload, them reinstalled MAUI component in VS.

Still have the same issue - when I try to build something, it says
NETSDK1139: The target platform identifier android was not recognized.

And when I try to install workloads, it says that Workload ID maui/android is not recognized.

@Dreamescaper
Copy link

Turns out that for some reason dotnet installation was missing sdk-manifests. I have copied them manually (to C:\Program Files\dotnet\sdk-manifests\6.0.200) from another installation, and it's all fine now.
sdk-manifests.zip

@v-longmin v-longmin added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Mar 2, 2022
@v-longmin
Copy link

Verified not repro.

@CalaxDev
Copy link
Author

CalaxDev commented Mar 2, 2022

What do you mean, verified not repro? It still doesn't work for many

@TanayParikh
Copy link
Contributor

Verified not repro.

This is a flaky issue which may explain why you weren't seeing an immediate repro. I've definitely seen this pretty recently. Going to re-open this issue so we can keep track of it.

@TanayParikh TanayParikh reopened this Mar 2, 2022
@TanayParikh TanayParikh removed the s/triaged Issue has been reviewed label Mar 2, 2022
@Redth
Copy link
Member

Redth commented Mar 23, 2022

Please install MAUI with Visual Studio. I'm closing this because there are a number of setup / environment related issues coming from having many preview versions installed. The recommendation is to uninstall older previews, and do a clean install with the latest Visual Studio preview.

@Redth Redth closed this as completed Mar 23, 2022
@CalaxDev
Copy link
Author

Hello @Redth

I'm sorry, but did you read my "Steps to reproduce '?
I've set up a brand new VM, installed VS2022 and it didn't work.

Please don't just close the issue, there are plenty of people still having problems with this...

@Redth
Copy link
Member

Redth commented Mar 23, 2022

The version you indicated is not the correct version.

Unfortunately, for Preview 14 of MAUI you need Visual Studio 17.2 Preview 2.1 installed and to not install any workloads via the command line.

@TanayParikh
Copy link
Contributor

The version you indicated is not the correct version.

Unfortunately, for Preview 14 of MAUI you need Visual Studio 17.2 Preview 2.1 installed and to not install any workloads via the command line.

Are there any recommendations for MacOS aside from uninstalling all other previews?

@NabodevMats
Copy link

Same issues trying to get maui working on macos. Followed all steps on https://dev.to/davidortinau/installing-net-maui-on-macos-4mmc but cant install maui workload.

mats$ sudo dotnet workload install maui --source https://api.nuget.org/v3/index.json
Password: ***********
Workload ID maui is not recognized.

Tried maui-check as well but stuck on

🔎 .NET SDK - Workloads (6.0.200) Checkup...
  ❌ android-aot (Microsoft.NET.Sdk.Android.Manifest-6.0.200 : 31.0.200-preview.12.2) not installed.
  ❌ ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
  ❌ maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
  ❌ tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
  ❌ macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.200 : 12.1.200-preview.12.4) not installed.
  ❌ maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.200 : 6.0.200-preview.12.2441) not installed.

Any idea’s?

@TanayParikh
Copy link
Contributor

@NabodevMats I suggest you retry with the 6.0.3 SDK running with MAUI RC1.

@mdimai666
Copy link

I install all dotnet on clear device and copy folders from
C:\Program Files\dotnet

@kshitij98-Cpp
Copy link

kshitij98-Cpp commented May 24, 2022

Same issues trying to get maui working on macos. Followed all steps on https://dev.to/davidortinau/installing-net-maui-on-macos-4mmc but cant install maui workload.

mats$ sudo dotnet workload install maui --source https://api.nuget.org/v3/index.json
Password: ***********
Workload ID maui is not recognized.

Tried maui-check as well but stuck on

🔎 .NET SDK - Workloads (6.0.200) Checkup...
  ❌ android-aot (Microsoft.NET.Sdk.Android.Manifest-6.0.200 : 31.0.200-preview.12.2) not installed.
  ❌ ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
  ❌ maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
  ❌ tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
  ❌ macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.200 : 12.1.200-preview.12.4) not installed.
  ❌ maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.200 : 6.0.200-preview.12.2441) not installed.

Any idea’s?

did u got the fix for that? I'm stuck in the same situation after running maui-check
and how to install the rest of workloads

@AlexeyStarkov
Copy link

AlexeyStarkov commented May 25, 2022

The version you indicated is not the correct version.

Unfortunately, for Preview 14 of MAUI you need Visual Studio 17.2 Preview 2.1 installed and to not install any workloads via the command line.

Visual studio installator still does not install workloads.
I'm facing the same issue that NabodevMats showed
VS 17.3.0 Preview 1.1. Clear installation. I have no other Visual Studio versions on my machine at all.

The only reason why people run command line is to fix the problem caused by the Visual Studio Installer that doesn't work properly

@kshitij98-Cpp
Copy link

Guys try this - Redth/dotnet-maui-check#105 (comment)
or if u have an error like Could not find a Xcode app bundle - #3888

@maroquio
Copy link

maroquio commented Jun 11, 2022

I'm using VS 17.3.0 Preview 1.1, with clear installation too. MAUI is not been shown when creating a new project, and command-line not working as well. I tried to add some other workloads (UWP and Desktop development) to check if it solved the problem, but it didn't. So, I don't understand why you closed this.
[UPDATE 1]
I've uninstalled all versions of Visual Studio and DotNet SDK from my computer and reinstalled VS2022 Preview alone, and I'm still getting the same error.
[UPDATE 2]
Please, check these links. Following these instructions, it worked here.
https://github.com/dotnet/maui/blob/main/.github/DEVELOPMENT.md#net-maui-workload
https://stackoverflow.com/questions/68746577/workload-repair-failed-dotnet-workload-repair-maui

@ghost ghost locked as resolved and limited conversation to collaborators Jul 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-setup Installation, setup, requirements, maui-check, workloads, platform support s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests