sdk: Unable to build the .NET MAUI Preview 9 project, VS IDE reports missing components, maui-check tool unable to find the package as it still points to RC 1 source feed
Description
Unable to build the .NET MAUI Preview 9 project, VS IDE reports missing components, maui-check tool unable to find the package as it still points to RC 1 source
Steps to Reproduce
- Update VS2022 to Preview 5 (17.0.0 Preview 5.0) with .NET MAUI (Preview) optional workload installed
- Updated the .NET MAUI templates to the latest (preview 9)
dotnet new --install Microsoft.Maui.Templates - Tried creating a new .NET MAUI project from both CLI and VS IDE, upon loading the project in VS IDE, it reports missing components, but upon launching VS installer, it reports all the required components are up-to-date. Refer attached screenshots
- Tried to update the workloads/missing components to the latest using both
dotnet workload updateandmaui-checkand they end up in error as they still point to the RC1 feeds - Error reported by
dotnet workload updatecommand - microsoft.net.sdk.maui.manifest-6.0.100.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds - Error reported by
maui-checkcommand - microsoft.maui.core.ref.android.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds
Kindly let me know the RC2 source feed URL to try the same and I tried the below URL but it’s not available (https://pkgs.dev.azure.com/dnceng/public/_packaging/6.0.100-rc.2.21505.57-shipping/nuget/v3/index.json).
Expected Behavior
The project should build and run on all the supported platforms.
Actual Behavior
Reports missing components and there is no solution to install/update them for now.
Basic Information
- Version with issue: .NET MAUI Preview 9
- Last known good version: NA
- IDE: VS 2022 Preview 5 (17.0.0 Preview 5.0)
- Platform Target Frameworks:
- iOS:
- Android:
- UWP:
- Android Support Library Version:
- Nuget Packages:
- Affected Devices:
Screenshots
Reproduction Link
Workaround
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 3
- Comments: 21 (5 by maintainers)
I got mine problem as well, but did resolve which follow like the other preview.
The recommended fix is to manually delete everything under “C:\Program Files\dotnet\metadata\workloads” and then install the workloads manually followed by another run at maui-check. And yup maui-check still help for me.
hope it helps.
Many errors here too after VS update (=> 17.1.0 Preview 1.1)
First quit all VS instances
Then I deleted the content of
C:\Program Files\dotnet\metadata\workloads\(thanks to @mindtalk69)Finally Powershell with admin rights
And all these issues disappeared. Hop it helps.
Post-installation of the Manifest MSI, executing
dotnet workload update/maui-checkinstalled all the required components, thus resolving the issue and am able to run the App on Android and Windows.Request to investigate the issue on why it has not detected the change even though the Manifest already installed as part of VS IDE update.
Found a temporary workaround by installing
Microsoft.NET.Sdk.Maui.Manifestfrom this URLhttps://download.visualstudio.microsoft.com/download/pr/183b6111-ff83-4e7c-bb14-5dc5ec2aef03/151f076c530b97cc52b98903685eadb11d598150467c7e43db2e536f1850c781/Microsoft.NET.Sdk.Maui.Manifest-6.0.100.6.0.101-preview.9.1843-x64.msi
Download the installer package, launch it and run it in Repair mode even if it is already installed.
As highlighted by @LuohuaRain, there is a lot of NU1603 warnings but am able to deploy the app to an Android physical device.
But still the Windows platform is having issues, trying to resolve it.
Yes, tried all those possibilities. Workload update, maui-check, VS restart, Machine restart.
From the command of fix applied by maui-check, it is evident that the package source feed still points to RC 1.
dotnet workload update --no-cache --disable-parallel --from-rollback-file "C:\Users\devuser\AppData\Local\Temp\maui-check-36fcb5c0\workload.json" --source "https://api.nuget.org/v3/index.json" --source "https://pkgs.dev.azure.com/dnceng/public/_packaging/6.0.100-rc.1.21458.32-shipping/nuget/v3/index.json"Could not able to figure out the source feed URL for RC 2/Preview 9, can someone from the MAUI engineering team share the feed URL to resolve this issue?
After run “dotnet build -t:Run -f net6.0-android” in the csproj folder, we were able to deploy again and see all emulators 😃