Open flennic opened 2 years ago
Same error here
@flennic I try to run failed command with the PACKAGE_SOURCE_NUGET_ORG value found in this repo:
sudo dotnet workload install android ios maccatalyst tvos macos maui --source "https://api.nuget.org/v3/index.json"
This install for me all that - which was failed
any update regarding this topic?
Any updates? Same issue here.
Same issue, watching for updates / workarounds on this
Same here, seems there is no fix to expect. :(
I still get the error, even after running chsh -s /bin/bash
to switch my default shell to bash.
Same issue.
@flennic I try to run failed command with the PACKAGE_SOURCE_NUGET_ORG value found in this repo:
sudo dotnet workload install android ios maccatalyst tvos macos maui --source "https://api.nuget.org/v3/index.json"
This install for me all that - which was failed
The above command doesn't work in my case. Getting the error:
Workload ID android is not recognized.
By checking the maui-check error log, seems that a workload.json
file is needed, so I tweaked a bit as:
sudo /usr/local/share/dotnet/dotnet workload install --from-rollback-file "/var/folders/bq/tk6w3xfx7md9tlj7hjrbl8w00000gn/T/maui-check-d9799fb5/workload.json" android ios maccatalyst tvos macos maui --source "https://api.nuget.org/v3/index.json"
of 'coz the temp location for workload.json
varies every time.
And now at least it works on me:
...
Installing workload manifest microsoft.net.sdk.android version 32.0.440…
Installing workload manifest microsoft.net.sdk.ios version 16.2.19…
Installing workload manifest microsoft.net.sdk.maccatalyst version 16.2.19…
Installing workload manifest microsoft.net.sdk.tvos version 16.1.257…
Installing workload manifest microsoft.net.sdk.macos version 13.1.19…
Installing workload manifest microsoft.net.sdk.maui version 6.0.419…
...
Garbage collecting for SDK feature band(s) 6.0.400...
Successfully installed workload(s) android ios maccatalyst tvos macos maui.
I still get the error, even after running
chsh -s /bin/bash
to switch my default shell to bash.
Switching default shell won't work, 'coz the maui-check tool will stick with zsh. Its error is like:
SHELL: /bin/zsh /var/folders/bq/tk6w3xfx7md9tlj7hjrbl8w00000gn/T/tmpxC4Rw6.tmp
zsh:1: command not found: PACKAGE_SOURCE_NUGET_ORG
The content inside /var/folders/bq/tk6w3xfx7md9tlj7hjrbl8w00000gn/T/tmpxC4Rw6.tmp
is like:
'/bin/zsh' -c 'sudo /usr/local/share/dotnet/dotnet workload install --from-rollback-file "/var/folders/bq/tk6w3xfx7md9tlj7hjrbl8w00000gn/T/maui-check-d9799fb5/workload.json" android ios maccatalyst tvos macos maui --source "$(PACKAGE_SOURCE_NUGET_ORG)"'
Instead, see whether the trick in my previous comment works for you. @kylewolford
same issue here.
Ok, I found the issue.
The code was supposed to replace the placeholder $(PACKAGE_SOURCE_NUGET_ORG) in the manifest with the value of the variable "PACKAGE_SOURCE_NUGET_ORG" that is also defined in the manifest. The are 2 instances of that placeholder in the manifest (under "variableMappers" and "dotnet"->"sdks"), the first replace was ocurring fine but the second was failing due to the type associated to it. The DotNetSdk.cs file is defining PackageSources of type List<string>
but that type fails in the check that happens on Check.cs:70/71
if (!prop.CanWrite) continue;
The fix was to have PackageSources defined of type string[] (as it is in the class NuGetFeedVariableMapper.cs where the replace occurs fine).
Here is the PR that fixes that: https://github.com/Redth/dotnet-maui-check/pull/164
Hey,
when trying to execute
maui-check
on macOS (intel) within azsh
, the installation raises the following issue:which is due to the issue that within the
*manifest.json
files$()
(command substitution) is used instead of${}
(parameter substitution) which works inbash
but not withinzsh
, see:does not work in
zsh
, butworks fine in both.
This is the root cause, however, to show the actual error, here the stack trace when continuing:
I tried to fix the issue by replacing the parentheses locally with curly braces and hard-coding the file path instead of the given manifest url to enforce the program to read in the new values. However, I run into all sorts of problems, the latest occurring at
BootsSolution.cs:32
which fails withI already spent some time with the code base and would rather ask for some help before spending more time on a thing I assume should be presumably easy to fix. I am willing to create a PR, but would like to have some feedback on the planned changes and the error shown above.
Regards, flennic