dotnet-maui-check
dotnet-maui-check copied to clipboard
[BUG] Workload installation failed: The JSON value could not be converted to
Issue with IOS work load on windows 10
More specificially this line
Garbage collecting for SDK feature bands 6.0.100... Workload installation failed: The JSON value could not be converted to Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadPackId. Path: $.Id | LineNumber: 0 | BytePositionInLine: 29.
Updated advertising manifest microsoft.net.workload.emscripten. Updated advertising manifest microsoft.net.sdk.maccatalyst. Updated advertising manifest microsoft.net.sdk.tvos. Updated advertising manifest microsoft.net.sdk.ios. Installing workload manifest microsoft.net.sdk.ios version 15.0.100-preview.7231. Installing workload manifest microsoft.net.sdk.maccatalyst version 15.0.100-preview.7231. Installing workload manifest microsoft.net.sdk.macos version 12.0.100-preview.7231. Installing workload manifest microsoft.net.sdk.tvos version 15.0.100-preview.7231. Installing pack Microsoft.iOS.Sdk version 15.0.100-preview.7.230... Writing workload pack installation record for Microsoft.iOS.Sdk version 15.0.100-preview.7.230... Installing pack Microsoft.iOS.Windows.Sdk version 15.0.100-preview.7.230... Writing workload pack installation record for Microsoft.iOS.Windows.Sdk version 15.0.100-preview.7.230... Installing pack Microsoft.iOS.Ref version 15.0.100-preview.7.230... Writing workload pack installation record for Microsoft.iOS.Ref version 15.0.100-preview.7.230... Installing pack Microsoft.iOS.Templates version 15.0.100-preview.7.230... Writing workload pack installation record for Microsoft.iOS.Templates version 15.0.100-preview.7.230... Installing pack Microsoft.Android.Sdk version 30.0.100-preview.7.110... Writing workload pack installation record for Microsoft.Android.Sdk version 30.0.100-preview.7.110... Installing pack Microsoft.Android.Sdk.BundleTool version 30.0.100-preview.7.110... Writing workload pack installation record for Microsoft.Android.Sdk.BundleTool version 30.0.100-preview.7.110... Installing pack Microsoft.Android.Ref version 30.0.100-preview.7.110... Writing workload pack installation record for Microsoft.Android.Ref version 30.0.100-preview.7.110... Installing pack Microsoft.Android.Templates version 30.0.100-preview.7.110... Writing workload pack installation record for Microsoft.Android.Templates version 30.0.100-preview.7.110... Installing pack Microsoft.MacCatalyst.Sdk version 15.0.100-preview.7.230... Writing workload pack installation record for Microsoft.MacCatalyst.Sdk version 15.0.100-preview.7.230... Installing pack Microsoft.MacCatalyst.Ref version 15.0.100-preview.7.230... Writing workload pack installation record for Microsoft.MacCatalyst.Ref version 15.0.100-preview.7.230... Installing pack Microsoft.MacCatalyst.Templates version 15.0.100-preview.7.230... Writing workload pack installation record for Microsoft.MacCatalyst.Templates version 15.0.100-preview.7.230... Garbage collecting for SDK feature bands 6.0.100... Workload installation failed: The JSON value could not be converted to Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadPackId. Path: $.Id | LineNumber: 0 | BytePositionInLine: 29.
Hey
I'm getting a very similar issue.
Trying to upgrade from preview 6 and have already installed maui-check 7.3.0.
I've already updated to VS 2022 Preview 3 and running maui-check results in it trying to repair the workload installation for maui.
My error is very similar to @davidbuckleyni's:
Workload repair failed: The JSON value could not be converted to Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadPackId. Path: $.Id | LineNumber: 0 | BytePositionInLine: 40.
Installation continues but results in the following:
Fix failed - Workload Update failed: `dotnet workload update --sdk-version 6.0.100-preview.7.21379.14 --no-cache --disable-parallel --from-rollback-file
"C:\Users\Paul\AppData\Local\Temp\maui-check-dotnet-work-dir\workload.json" --source "https://api.nuget.org/v3/index.json" --source
"https://pkgs.dev.azure.com/dnceng/public/_packaging/6.0.100-preview.7.21379.14-shipping-1/nuget/v3/index.json"`
This attempt was using the --force-dotnet
switch. I had a previous failure where the configured NuGet package wasn't available in the source:
Installing pack Microsoft.Maui.Core.Ref.android version 6.0.100-preview.7.1063+sha.f5acc965e-azdo.5006556...
Rolling back pack Microsoft.Maui.Core.Ref.android installation...
Workload repair failed: microsoft.maui.core.ref.android::6.0.100-preview.7.1063 is not found in NuGet feeds https://api.nuget.org/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/6.0.100-preview.7.21379.14-shipping-1/nuget/v3/index.json".
I can see that the current version of the 'missing' package is "Microsoft.Maui.Core.Ref.android -Version 6.0.100-preview.7.1345" from three days ago when preview 7 was released.
Upon further investigation this doesn't appear to be a maui-check issue. Trying to install the maui workloads manually using dotnet workload install maui
results in the same error:
Workload installation failed: The JSON value could not be converted to Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadPackId. Path: $.Id | LineNumber: 0 | BytePositionInLine: 52.
Aaaaaaaaaaaaaaaaaaaaaaaaad.......
In more recent developments, it appears that there was a manifest change a while ago in some of the json configs, so this issue is likely to occur when you have previously had Preview 6 installed.
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:
dotnet workload install maui
then
maui-check
Worked for me:
@Redth might be one for u to look above as to a fix for future releases
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Aaaaaaaaaaaaaaaaaaaaaaaaad.......
In more recent developments, it appears that there was a manifest change a while ago in some of the json configs, so this issue is likely to occur when you have previously had Preview 6 installed.
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:
dotnet workload install maui
then
maui-check
Worked for me:
Probally still be worth redth checking the json change and asking users to delete workloads to update?
Upon further investigation this doesn't appear to be a maui-check issue. Trying to install the maui workloads manually using
dotnet workload install maui
results in the same error:Workload installation failed: The JSON value could not be converted to Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadPackId. Path: $.Id | LineNumber: 0 | BytePositionInLine: 52.
dotnet tool update -g redth.net.maui.check
should do the trick (had the same problem)
I also had an older preview of 6.0 installed and encountered the same errors with both maui-check and the dotnet workload install maui commands.
+1 on the fix, https://github.com/Redth/dotnet-maui-check/issues/105#issuecomment-898295227
This helped me to install preview7 after having installed preview6:
dotnet workload install maui -v d --ignore-failed-sources --disable-parallel --temp-dir="C:\maui-temp"
@Redth buddy u could easily add remove preview versions before installing maybe would be a good option are u accepting pull request into the product.
I still get this with Tool 'redth.net.maui.check' was reinstalled with the latest stable version (version '0.8.4').
Workload installation failed: One or more errors occurred. (microsoft.maui.core.ref.android.msi.x64::6.0.100-rc.1.1351 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages".)
maui-check --preview
did the trick and installed all req workloads
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:
Where are the workloads installed on macos?
FYI I found it here /usr/local/share/dotnet/metadata/workloads
Another thing that makes me upset about this tool is that if you say are using the rc.2 .NET SDK and do the steps above to properly install the RC.2 versions of MAUI, this tool then forces the uninstall of the RC.2 versions for the preview 7 ones which makes me mad because I want to keep those versions and use it with Visual Studio.
Honestly I think the tool should check for Preview 7 (or newer) and if they have a version newer than Preview 7 installed (like rc.1 or rc.2) to use that to install maui (or the templates to maui) on.
This helped me. I wanted to add my symptoms:
Messing around and updating from VS2022 Preview 3 to Preview 4, MAUI templates were missing when I went to create a new project. I tried maui-check (which Microsoft says is not necessary), but that would error on workloads: maui, maui-ios, maui-android, maui-catalyst. I would see this error:
Same here
That's work for me if I want to use the maui preview8.
- Clean the history data use this script: https://github.com/Redth/dotnet-maui-check/blob/main/Clean-Old-DotNet6-Previews.ps1
2.Delete the maui-check tool:
dotnet tool uninstall -g Redth.Net.Maui.Check
3.Uninstall VS2012 Preview4
4.Reinstall VS2012 Preview4
5.Reinstall maui-check tool:
dotnet tool install -g Redth.Net.Maui.Check
6.Do check script:
maui-check
Just run this script https://github.com/Redth/dotnet-maui-check/blob/main/Clean-Old-DotNet6-Previews.ps1
then dotnet tool update -g Redth.Net.Maui.Check
then maui-check
That's work for me if I want to use the maui preview8.
- Clean the history data use this script:
https://github.com/Redth/dotnet-maui-check/blob/main/Clean-Old-DotNet6-Previews.ps1
2.Delete the maui-check tool:
dotnet tool uninstall -g Redth.Net.Maui.Check
3.Uninstall VS2012 Preview4
4.Reinstall VS2012 Preview4
5.Reinstall maui-check tool:
dotnet tool install -g Redth.Net.Maui.Check
6.Do check script:
maui-check
These should be steps done by maui check user should not need to do all this @Redth
Aaaaaaaaaaaaaaaaaaaaaaaaad.......
In more recent developments, it appears that there was a manifest change a while ago in some of the json configs, so this issue is likely to occur when you have previously had Preview 6 installed.
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:
dotnet workload install maui
then
maui-check
Worked for me:
Fixed my issue.
Seems to be still an issue here
» Synchronizing configuration... ok
» Scheduling appointments... ok
> OpenJDK 11.0 Checkup...
- 11.0.12 (C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\..)
> Visual Studio 17.1.0-pre.3.0 Checkup...
- 17.3.0-pre.1.0 - C:\Program Files\Microsoft Visual Studio\2022\Preview
- 17.1.6 - C:\Program Files\Microsoft Visual Studio\2022\Community
> Android SDK Checkup...
x Skipped: Android Emulator
> .NET SDK Checkup...
- 6.0.202 - C:\Program Files\dotnet\sdk\6.0.202
- 6.0.300-preview.22204.3 - C:\Program Files\dotnet\sdk\6.0.300-preview.22204.3
- 6.0.300 - C:\Program Files\dotnet\sdk\6.0.300
> .NET SDK - Workload Deduplication Checkup...
> Edge WebView2 Checkup...
- Found Edge WebView2 version 101.0.1210.39
> .NET SDK - Workloads (6.0.200) Checkup...
x android-aot (Microsoft.NET.Sdk.Android.Manifest-6.0.200 : 31.0.200-preview.12.2) not installed.
x ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
x maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
x tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed.
x macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.200 : 12.1.200-preview.12.4) not installed.
x maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.200 : 6.0.200-preview.12.2441) not 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.
Are you sure you would like to continue the CLI workload installation? [y/n] (n): y
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Recommendation: Install or Update SDK Workloads
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
! Attempt to fix? [y/n] (y): y
» Attempting to fix: .NET SDK - Workloads (6.0.200)
SHELL: C:\Program Files\dotnet\dotnet.exe workload install --from-rollback-file "C:\Users\David\AppData\Local\Temp\maui-check-3002800c\workload.json" android-aot ios maccatalyst tvos macos maui --source "https://api.nuget.org/v3/index.json"
Workload ID android-aot is not recognized.
Fix failed - Workload Install failed: `dotnet workload install --from-rollback-file
"C:\Users\David\AppData\Local\Temp\maui-check-3002800c\workload.json" android-aot ios maccatalyst tvos macos maui
--source "https://api.nuget.org/v3/index.json"`
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
! There were one or more problems detected.
Please review the errors and correct them and run maui-check again.
Please, check these links. I had the same issue. Following these instructions, it worked here. https://github.com/dotnet/maui/blob/main/.github/DEVELOPMENT.md#net-maui-workload https://stackoverflow.com/questions/68746577/workload-repair-failed-dotnet-workload-repair-maui