Skip to content

dotnet tool with WSL #48870

Open
Open
@Lordfirespeed

Description

@Lordfirespeed

Describe the bug

dotnet tool CLI running in host OS (windows) fails to interact with project files on WSL.

To Reproduce

in WSL:

mkdir -p ~/projects/use-dotnet-tool
cd ~/projects/use-dotnet-tool

in PowerShell:

# replace {USER} with WSL username
cd \\wsl.localhost\Ubuntu\home\{USER}\projects\use-dotnet-tool
dotnet new tool-manifest
dotnet tool install dotnetsay

Exceptions (if any)

File \\wsl.localhost\Ubuntu\home\{USER}\projects\use-dotnet-tool\.config\dotnet-tools.json came from another computer and might be blocked to help protect this computer. For more information, including how to unblock, see https://aka.ms/motw

Further technical details

.NET SDK:
 Version:           9.0.200
 Commit:            90e8b202f2
 Workload version:  9.0.200-manifests.b4a8049f
 MSBuild version:   17.13.8+cbc39bea8

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Users\{USER}\.dotnet\sdk\9.0.200\

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.2
  Architecture: x64
  Commit:       80aa709f5d

.NET SDKs installed:
  9.0.200 [C:\Users\{USER}\.dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.2 [C:\Users\{USER}\.dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 9.0.2 [C:\Users\{USER}\.dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 9.0.2 [C:\Users\{USER}\.dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [C:\Users\{USER}\.dotnet]

global.json file:
  \\wsl.localhost\Ubuntu\home\{USER}\projects\use-dotnet-tool\global.json

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

Download .NET:
  https://aka.ms/dotnet/download

IDE: None, reproduction possible with WSL Bash + Powershell only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions