Open egvijayanand opened 3 years ago
After run "dotnet build -t:Run -f net6.0-android" in the csproj folder, we were able to deploy again and see all emulators :)
It didn't resolve, the issue still persists. BTW, What's the source feed for RC2 packages?
Here is the output of the build command and the suggested solution from the same (workload install command):
E:\Maui\Preview 9\MauiApp2\MauiApp2>dotnet build -f:net6.0-android Microsoft (R) Build Engine version 17.0.0-preview-21501-01+bbcce1dff for .NET Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore... C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: maui-android [E:\Maui\Preview 9\MauiApp2\MauiApp2\MauiApp2.csproj] C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload install maui-android [E:\Maui\Preview 9\MauiApp2\MauiApp2\MauiApp2.csproj]
E:\Maui\Preview 9\MauiApp2\MauiApp2>dotnet workload install maui-android
Updated advertising manifest microsoft.net.sdk.android. Updated advertising manifest microsoft.net.sdk.maui. Updated advertising manifest microsoft.net.sdk.macos. Updated advertising manifest microsoft.net.sdk.ios. Updated advertising manifest microsoft.net.workload.emscripten. Updated advertising manifest microsoft.net.workload.mono.toolchain. Updated advertising manifest microsoft.net.sdk.tvos. Updated advertising manifest microsoft.net.sdk.maccatalyst. Downloading Microsoft.Maui.Core.Ref.android.Msi.x64 (6.0.101-preview.9.1805) Downloading Microsoft.Maui.Core.Ref.android.Msi.x64 (6.0.101-preview.9.1805) Workload installation failed. Rolling back installed packs... Downloading microsoft.net.sdk.maui.manifest-6.0.100.msi.x64 (6.0.101-preview.9.1805) Installation rollback failed: One or more errors occurred. (microsoft.net.sdk.maui.manifest-6.0.100.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\;E:\Tasks\Projects\Templates\Release\NuGet".) Workload installation failed: One or more errors occurred. (microsoft.maui.core.ref.android.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\;E:\Tasks\Projects\Templates\Release\NuGet".)
Regards, Vijay Anand E G
It didn't resolve, the issue still persists. BTW, What's the source feed for RC2 packages?
Here is the output of the build command and the suggested solution from the same (workload install command):
E:\Maui\Preview 9\MauiApp2\MauiApp2>dotnet build -f:net6.0-android Microsoft (R) Build Engine version 17.0.0-preview-21501-01+bbcce1dff for .NET Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore... C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: maui-android [E:\Maui\Preview 9\MauiApp2\MauiApp2\MauiApp2.csproj] C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload install maui-android [E:\Maui\Preview 9\MauiApp2\MauiApp2\MauiApp2.csproj]
E:\Maui\Preview 9\MauiApp2\MauiApp2>dotnet workload install maui-android
Updated advertising manifest microsoft.net.sdk.android. Updated advertising manifest microsoft.net.sdk.maui. Updated advertising manifest microsoft.net.sdk.macos. Updated advertising manifest microsoft.net.sdk.ios. Updated advertising manifest microsoft.net.workload.emscripten. Updated advertising manifest microsoft.net.workload.mono.toolchain. Updated advertising manifest microsoft.net.sdk.tvos. Updated advertising manifest microsoft.net.sdk.maccatalyst. Downloading Microsoft.Maui.Core.Ref.android.Msi.x64 (6.0.101-preview.9.1805) Downloading Microsoft.Maui.Core.Ref.android.Msi.x64 (6.0.101-preview.9.1805) Workload installation failed. Rolling back installed packs... Downloading microsoft.net.sdk.maui.manifest-6.0.100.msi.x64 (6.0.101-preview.9.1805) Installation rollback failed: One or more errors occurred. (microsoft.net.sdk.maui.manifest-6.0.100.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages;E:\Tasks\Projects\Templates\Release\NuGet".) Workload installation failed: One or more errors occurred. (microsoft.maui.core.ref.android.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages;E:\Tasks\Projects\Templates\Release\NuGet".)
Regards, Vijay Anand E G
The solution of @juanlao has worked for me. have you tried restarting VS2022 after executing the command @juanlao says? Have you run the maui-check?
It didn't resolve, the issue still persists. BTW, What's the source feed for RC2 packages? Here is the output of the build command and the suggested solution from the same (workload install command): E:\Maui\Preview 9\MauiApp2\MauiApp2>dotnet build -f:net6.0-android Microsoft (R) Build Engine version 17.0.0-preview-21501-01+bbcce1dff for .NET Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: maui-android [E:\Maui\Preview 9\MauiApp2\MauiApp2\MauiApp2.csproj] C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload install maui-android [E:\Maui\Preview 9\MauiApp2\MauiApp2\MauiApp2.csproj] E:\Maui\Preview 9\MauiApp2\MauiApp2>dotnet workload install maui-android Updated advertising manifest microsoft.net.sdk.android. Updated advertising manifest microsoft.net.sdk.maui. Updated advertising manifest microsoft.net.sdk.macos. Updated advertising manifest microsoft.net.sdk.ios. Updated advertising manifest microsoft.net.workload.emscripten. Updated advertising manifest microsoft.net.workload.mono.toolchain. Updated advertising manifest microsoft.net.sdk.tvos. Updated advertising manifest microsoft.net.sdk.maccatalyst. Downloading Microsoft.Maui.Core.Ref.android.Msi.x64 (6.0.101-preview.9.1805) Downloading Microsoft.Maui.Core.Ref.android.Msi.x64 (6.0.101-preview.9.1805) Workload installation failed. Rolling back installed packs... Downloading microsoft.net.sdk.maui.manifest-6.0.100.msi.x64 (6.0.101-preview.9.1805) Installation rollback failed: One or more errors occurred. (microsoft.net.sdk.maui.manifest-6.0.100.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages;E:\Tasks\Projects\Templates\Release\NuGet".) Workload installation failed: One or more errors occurred. (microsoft.maui.core.ref.android.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages;E:\Tasks\Projects\Templates\Release\NuGet".) Regards, Vijay Anand E G
The solution of @juanlao has worked for me. have you tried restarting VS2022 after executing the command @juanlao says? Have you run the maui-check?
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?
yep, same problem. A lot warnings NU1603 and publish failed
Found a temporary workaround by installing Microsoft.NET.Sdk.Maui.Manifest
from this URL
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.
Can you check your PATH
environment variable and make sure the C:\Program Files\dotnet
comes BEFORE the C:\Program Files (x86)\dotnet
?
I noticed this happening a few days ago on some of my machines.
Post-installation of the Manifest MSI, executing dotnet workload update
/ maui-check
installed 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.
Can you check your
PATH
environment variable and make sure theC:\Program Files\dotnet
comes BEFORE theC:\Program Files (x86)\dotnet
?I noticed this happening a few days ago on some of my machines.
While installing the .NET 6 RC 2 SDK, faced the issue as depicted in the screenshot. But on machine restart, it disappeared and continued with the SDK update.
This is the order in which environment variables are found:
C:\Program Files\dotnet\ C:\Program Files (x86)\dotnet\
Are you able to run windows apps mow?
Are you able to run windows apps mow?
Yes. After manifest repair, installed the maui workload. With which, am able to run the app.
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.
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.
it works for me. thanks.
For those facing this as a result of PATH being out of order see https://github.com/dotnet/sdk/issues/22047.
@mattleibow are there any outstanding issues we should take a look at here? It looks like everything got sorted out.
In my case, in addition to
https://github.com/dotnet/sdk/issues/22009#issuecomment-942430121
and
https://github.com/dotnet/sdk/issues/22009#issuecomment-942480651
I also had to update the Maui templates manually:
dotnet new --install Microsoft.Maui.Templates::6.0.101-preview.9.1843
It works on Android, it compiles on windows but it is not able to deploy even I If I right click -> Deploy. I noticed I do not have the C:\Program Files (x86)\dotnet\ variable
2>------ Deploy started: Project: MauiApp4, Configuration: Debug Any CPU ------ 2>Need recipe file ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
I recently had to go into my C:\Program Files\dotnet
folder and manually delete a bunch of old dotnet maui templates and preview 6 stuff that was left behind.
After that i ran the cleanup script from the maui-check repo again.
After that maui-check was able to correctly install all the additional workloads for me.
Hope this helps!
After upgrading to preview 10, I got it to work properly.
dotnet workload install maui `
--from-rollback-file https://aka.ms/dotnet/maui/preview.10.json `
--source https://aka.ms/dotnet6/nuget/index.json `
--source https://api.nuget.org/v3/index.json
The VS installer however still references preview9, which seems to be broken due to missing Nuget packages on the feed.
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
dotnet workload update
dotnet workload list
dotnet workload install maui
dotnet workload install maui-android
dotnet workload install maui-ios
maui-check
And all these issues disappeared. Hop it helps.
The maui-check tool should no longer be needed as we just use the workloads. In fact, if you are installing VS for the first time, you probably should not use the CLI and let the IDE install and update workloads. This makes things run more smoothly.
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 sourceSteps to Reproduce
dotnet new --install Microsoft.Maui.Templates
dotnet workload update
andmaui-check
and they end up in error as they still point to the RC1 feedsdotnet workload update
command - microsoft.net.sdk.maui.manifest-6.0.100.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feedsmaui-check
command - microsoft.maui.core.ref.android.msi.x64::6.0.101-preview.9.1805 is not found in NuGet feedsKindly 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
Screenshots
Reproduction Link
Workaround