Redth / dotnet-maui-check

.NET MAUI Check tool
MIT License
477 stars 79 forks source link

maui installation broke randomly(?) #142

Open emceelovin opened 2 years ago

emceelovin commented 2 years ago

all of a sudden my maui projects stopped building. i completely reinstalled VS2022 Preview and GA, all of the dotnet frameworks, ran the cleanup tool, etc. i'm really not sure why, and am very frustrated being non productive, that reinstalling VS2022 preview doesn't fix the problem. you would think it would install everything it needs properly.

when i run maui-check -v, this is the error i receive:

Checkup had Error status: dotnetworkloads-6.0.100

dotnetworkloads-6.0.100: Could not find a part of the path 'C:\Program Files\dotnet\sdk-manifests'.

when i try to manually install the manifests via dotnet, i get this error:

dotnet add package Microsoft.NET.Sdk.Maui.Manifest-6.0.100.Msi.x64 --version 6.0.101-preview.10.2068 Determining projects to restore... C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(112,5): error NETSDK1139: The target platform identifier android was not recognized. [] Unable to create dependency graph file for project ''. Cannot add package reference.

to get the maui-check error above, i had to run --verbose. if i don't, maui-check doesn't even tell me whats going on. it just cuts off:

.NET SDK - Workloads (6.0.100) Checkup... ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

! There were one or more problems detected. Please review the errors and correct them and run maui-check again.

Press enter to exit...

also, the maui workload isnt valid anymore. anytime i type dotnet workload install maui, it tells me that maui isnt a valid workload id

emceelovin commented 2 years ago

EDIT: apparnetly, all of my workloads and sdk manifests were put into AppData\Local\Microsoft\dotnet. i had to add that to my path. now maui-check is showing my failed workload installations

EDIT: copied the sdk-manifest folder from inside the AppData\Local\Microsoft\dotnet into program files\dotnet, and now maui-check is able to install the proper workloads