Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install workload via cmd with error "System.ArgumentNullException: Value cannot be null. (Parameter 'paths') ..." on MacOS #47270

Closed
MMtwo opened this issue Mar 5, 2025 · 5 comments
Assignees
Labels
Area-Workloads untriaged Request triage from a team member

Comments

@MMtwo
Copy link

MMtwo commented Mar 5, 2025

Describe the bug

we will meet this error when we install workload by command line on MacOS and Linux OS

To Reproduce

  1. Run the command via terminal
    sudo dotnet workload install wasm-experimental

Note

  1. This issue also reproduces when we install wasm-tools via cmd sudo dotnet workload install wasm-tools
  2. This issue also reproduces when we install maui via cmd sudo dotnet workload install maui
  3. This issue also reproduces on MacOS and Linux OS
  4. This issue doesn't reproduce on Windows

Exceptions (if any)

System.ArgumentNullException: Value cannot be null. (Parameter 'paths')
   at System.ArgumentNullException.Throw(String paramName)
   at System.IO.Path.Combine(ReadOnlySpan`1 paths)
   at Microsoft.DotNet.Cli.SudoEnvironmentDirectoryOverride.OverrideEnvironmentVariableToTmp(ParseResult parseResult)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)

Image

Further technical details

  • Include the output of dotnet --info
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
.NET SDK:
Version:           10.0.100-preview.2.25126.21
Commit:            f4f293c695
Workload version:  10.0.100-manifests.849cb335
MSBuild version:   17.14.0-preview-25126-06+e18e7f0af


Runtime Environment:
OS Name:     Mac OS X
OS Version:  15.3
OS Platform: Darwin
RID:         osx-arm64
Base Path:   /usr/local/share/dotnet/sdk/10.0.100-preview.2.25126.21/


.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
Workloads are configured to install and update using workload versions, but none were found. Run "dotnet workload restore" to install a workload version.


Host:
  Version:      10.0.0-preview.2.25125.14
  Architecture: arm64
  Commit:       143f7e2ca0


.NET SDKs installed:
  10.0.100-preview.2.25126.21 [/usr/local/share/dotnet/sdk]


.NET runtimes installed:
  Microsoft.AspNetCore.App 10.0.0-preview.2.25126.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 10.0.0-preview.2.25125.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]


Other architectures found:
  x64   [/usr/local/share/dotnet/x64]
    registered at [/etc/dotnet/install_location_x64]


Environment variables:
  Not set


global.json file:
  Not found


Learn more:
  https://aka.ms/dotnet/info


Download .NET:
  https://aka.ms/dotnet/download
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Workloads untriaged Request triage from a team member labels Mar 5, 2025
@MMtwo
Copy link
Author

MMtwo commented Mar 5, 2025

This bug blocked our test scenario of installing workloads from the command line on MacOS and Linux OS

@marcpopMSFT
Copy link
Member

Please prioritize if you can

@joeloff
Copy link
Member

joeloff commented Mar 5, 2025

Should be available in the next P2 build

@Forgind
Copy link
Member

Forgind commented Mar 5, 2025

This is a duplicate of #46821. That was fixed in main previously and has now been backported to p2, as joeloff said.

@Forgind Forgind closed this as completed Mar 5, 2025
@jinzhao1127
Copy link

Verify this bug on the latest 10.0 Preview 2 coherent build, it was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

5 participants