dotnet-maui-check
dotnet-maui-check copied to clipboard
error when installing ".NET SDK - Workloads" using maui-check
The environment information:
SDK and MONO are up to date:
The error output:
Thanks for choosing .NET MAUI!
⏳ Synchronizing configuration... ok
⏳ Scheduling appointments... ok
🔎 OpenJDK 11.0 Checkup...
✔ 11.0.12 (/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/bin/..)
🔎 Visual Studio 17.3.0.1028 Checkup...
✔ Visual Studio for Mac (17.3.1.411)
🔎 Android SDK Checkup...
✔ emulator (31.2.10)
✔ build-tools;31.0.0 (31.0.0)
✔ platforms;android-31 (1)
✔ system-images;android-31;google_apis;arm64-v8a (10)
✔ platform-tools (33.0.2)
✔ cmdline-tools;5.0 (5.0)
🔎 Android Emulator Checkup...
✔ Emulator: Pixel_5_API_29 found.
🔎 XCode 13.3 Checkup...
✔ Xcode.app (13.3)
🔎 .NET SDK Checkup...
– 6.0.300 - /usr/local/share/dotnet/sdk/6.0.300
– 6.0.400 - /usr/local/share/dotnet/sdk/6.0.400
🔎 .NET SDK - Workload Deduplication Checkup...
🔎 .NET SDK - Workloads (6.0.301) Checkup...
❌ android (Microsoft.NET.Sdk.Android.Manifest-6.0.300 : 32.0.440) not installed.
❌ ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.300 : 15.4.447) not installed.
❌ maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.400 : 15.4.447) not installed.
❌ tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.400 : 15.4.447) not installed.
❌ macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.400 : 12.3.447) not installed.
❌ maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.300 : 6.0.419) not installed.
💉 Recommendation: Install or Update SDK Workloads
🔔 Attempt to fix? [y/n] (y): y
⏳ Attempting to fix: .NET SDK - Workloads (6.0.301)
SHELL: /bin/zsh /var/folders/xc/4gl080rx7n364ctyt0cqjm3h0000gn/T/tmpyKF4ei.tmp
zsh:1: command not found: PACKAGE_SOURCE_NUGET_ORG
Password:
Unhandled exception: System.ArgumentException: The path is empty. (Parameter 'path')
at System.IO.Path.GetFullPath(String path)
at Microsoft.DotNet.Cli.NuGetPackageDownloader.PackageSourceLocation.ExpandLocalFeed(String[] sourceFeedOverrides)
at Microsoft.DotNet.Workloads.Workload.InstallingWorkloadCommand..ctor(ParseResult parseResult, IReporter reporter, IWorkloadResolver workloadResolver, IInstaller workloadInstaller, INuGetPackageDownloader nugetPackageDownloader, IWorkloadManifestUpdater workloadManifestUpdater, String dotnetDir, String userProfileDir, String tempDirPath, String version, String installedFeatureBand)
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, String installedFeatureBand)
at Microsoft.DotNet.Cli.WorkloadInstallCommandParser.<>c.<ConstructCommand>b__6_0(ParseResult parseResult)
at Microsoft.DotNet.Cli.ParseResultCommandHandler.Invoke(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
Fix failed - Workload Install failed: `dotnet workload install --from-rollback-file "/var/folders/xc/4gl080rx7n364ctyt0cqjm3h0000gn/T/maui-check-dd6ad34d/workload.json" android ios maccatalyst tvos macos maui --source "$(PACKAGE_SOURCE_NUGET_ORG)"`
🔔 There were one or more problems detected.
Please review the errors and correct them and run maui-check again.
Press enter to exit...
I successfully install the MAUI workload by the following command:
dotnet workload install maui
and then type maui-check
command and will get an "all ok" message
But this is just another way to avoid the error and install MAUI wordload successfully, the problem itself is not solved
reference: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-workload-install
For me maui-check
still fails and wants Xcode 13.3
while I have the latest one Xcode 14.2
.
Is that ok?
So the hello world
template project does not run due to (even after the successful dotnet workload install maui
)
Getting restore information for project .../HelloWorld/HelloWorld.csproj
/usr/local/share/dotnet/sdk/7.0.200/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(112,5) : error NETSDK1139: The target platform identifier android was not recognized.
Unable to create package spec for project. '.../HelloWorld.csproj'
The maui-check --fix
fails with the error below:
Unhandled exception: System.ArgumentException: The path is empty. (Parameter 'path')
at System.IO.Path.GetFullPath(String path)
at Microsoft.DotNet.Cli.NuGetPackageDownloader.PackageSourceLocation.ExpandLocalFeed(String[] sourceFeedOverrides)
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.Cli.WorkloadInstallCommandParser.<>c.<ConstructCommand>b__14_0(ParseResult parseResult)
at Microsoft.DotNet.Cli.ParseResultCommandHandler.Invoke(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
Fix failed - Workload Install failed: `dotnet workload install --from-rollback-file
"/var/folders/vz/td1yqc9d6zq0n8y_n02qvx3r0000gn/T/maui-check-96eaa125/workload.json" android ios
maccatalyst tvos macos maui --source "$(PACKAGE_SOURCE_NUGET_ORG)"`
The issue is, that check.dotnet.sdks.packageSources
is not resolving check.variables
. When adding https://api.nuget.org/v3/index.json
directly, it works fine. You can download the manifest from the URL and use -m maui.manifest.json
with the corrected file until fixed.