Redth / dotnet-maui-check

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

Maui-Check fails #145

Open casterle opened 2 years ago

casterle commented 2 years ago

Win11 Pro x64, VS2022 Community 17.1 Preview 3

When I run Maui-Check, it fails:

> .NET SDK - Workloads (6.0.100) Checkup...
  x android-aot (Microsoft.NET.Sdk.Android.Manifest-6.0.100 : 31.0.101-preview.11.117) not installed.
  x ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.100 : 15.0.101-preview.11.551) not installed.
  x maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.100 : 15.0.101-preview.11.551) not installed.
  x tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.100 : 15.0.101-preview.11.551) not installed.
  x macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.100 : 12.0.101-preview.11.551) not installed.
  x maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.100 : 6.0.101-preview.11.2349) not installed.
  x wasm-tools (microsoft.net.workload.mono.toolchain.manifest-6.0.100 : 6.0.0) not installed.
  - microsoft-net-sdk-emscripten (microsoft.net.workload.emscripten.manifest-6.0.100 : 6.0.0) installed.
! Managing Workload installation from the CLI is NOT recommended.  Instead you should install the latest Visual Studio
preview to automatically get the newest release of .NET MAUI workloads installed.

Given the warning not to install via the CLI, I selected the 'No' option. I thought I had the latest Preview installed but checked and found Preview 3 available. After installing the update, I ran Maui-Check again with the same result.

This time I elected to let the CLI do the work, which also failed.

! Attempt to fix? [y/n] (y): y
» Attempting to fix: .NET SDK - Workloads (6.0.100)
SHELL: C:\Program Files\dotnet\dotnet.exe workload install --from-rollback-file "C:\Users\casterle\AppData\Local\Temp\maui-check-6b536ffd\workload.json" android-aot ios maccatalyst tvos macos maui wasm-tools --source "https://api.nuget.org/v3/index.json"

Failed to update the advertising manifest microsoft.net.workload.emscripten: microsoft.net.workload.emscripten.manifest-6.0.200 is not found in NuGet feeds https://api.nuget.org/v3/index.json"..
Updated advertising manifest microsoft.net.sdk.maui.
Updated advertising manifest microsoft.net.sdk.tvos.
Updated advertising manifest microsoft.net.sdk.ios.
Updated advertising manifest microsoft.net.sdk.macos.
Updated advertising manifest microsoft.net.sdk.android.
Updated advertising manifest microsoft.net.sdk.maccatalyst.
Updated advertising manifest microsoft.net.workload.mono.toolchain.
Downloading microsoft.net.sdk.android.manifest-6.0.200.msi.x64 (31.0.101-preview.11.117)
Workload installation failed. Rolling back installed packs...
Downloading microsoft.net.workload.mono.toolchain.manifest-6.0.200.msi.x64 (6.0.2-mauipre.1.22054.8)
Downloading microsoft.net.workload.emscripten.manifest-6.0.200.msi.x64 (6.0.0)
Installation rollback failed: One or more errors occurred. (microsoft.net.workload.emscripten.manifest-6.0.200.msi.x64::6.0.0 is not found in NuGet feeds https://api.nuget.org/v3/index.json".)
Workload installation failed: One or more errors occurred. (microsoft.net.sdk.android.manifest-6.0.200.msi.x64::31.0.101-preview.11.117 is not found in NuGet feeds https://api.nuget.org/v3/index.json".)

Surely there must be another way to get Maui working! Suggestions welcome.

Rabosa616 commented 2 years ago

I´ve succeed to update to latest maui version and run a maui project for windows and android, here you have my steps:

  1. dotnet nuget locals all --clear
  2. Uninstall all workloads one by one dotnet workload list <-- that returned me all the workloads (if you see any android-aot, remove it the first one and then proceed with the rest) dotnet workload uninstall <Name of the Workload>
  3. Install the workloads again: dotnet workload install android ios maccatalyst tvos macos maui wasm-tools --from-rollback-file https://aka.ms/dotnet/maui/preview.12.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json --no-cache
  4. Open Visual Studio and create a brand new Maui project
  5. Run! worked

Note: I experienced issues with the old examples on windows, I´ve fix them by opening the Package.appxmanifest and remove all the "Assets" before any image