Skip to content

[10.0-rc.1] dotnet run no longer accepts Windows path separators on Linux #50828

@martincostello

Description

@martincostello

Describe the bug

I have a simple console project that I've just updated to .NET 10 RC.1 with a layout like this:

global.json MyProject.slnx Run.ps1 src/ MyProject/ MyProject.csproj Program.cs 

Note that while simple, this was a .NET 9 project so hasn't been changed to adopt the new Program.cs support style of program.

I then have a PowerShell script that builds and runs the project like so:

dotnet run --configuration Release --project .\src\MyProject\MyProject.csproj $args

This works fine on Windows, but on Linux it fails with the following error:

The provided file path does not exist: .\src\MyProject\MyProject.csproj. 

If I change the PowerShell script to the following, it works:

- dotnet run --configuration Release --project .\src\MyProject\MyProject.csproj $args + dotnet run --configuration Release --project ./src/MyProject/MyProject.csproj $args

It appears that the .NET 10 SDK is no longer normalizing the path separators.

Changing to / does work on Windows though - it's just \ on Linux that no longer works.

To Reproduce

Create a folder structure with the above layout and run the specified command.

Exceptions (if any)

None.

Further technical details

details of dotnet --info

$ dotnet --info .NET SDK: Version: 10.0.100-rc.1.25451.107 Commit: 2db1f5ee2b Workload version: 10.0.100-manifests.1a2d104c MSBuild version: 17.15.0-preview-25451-107+2db1f5ee2 Runtime Environment: OS Name: ubuntu OS Version: 24.04 OS Platform: Linux RID: linux-x64 Base Path: /usr/lib/dotnet/sdk/10.0.100-rc.1.25451.107/ .NET workloads installed: There are no installed workloads to display. Configured to use workload sets when installing new manifests. No workload sets are installed. Run "dotnet workload restore" to install a workload set. Host: Version: 10.0.0-rc.1.25451.107 Architecture: x64 Commit: 2db1f5ee2b .NET SDKs installed: 9.0.105 [/usr/lib/dotnet/sdk] 10.0.100-rc.1.25451.107 [/usr/lib/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 9.0.4 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 10.0.0-rc.1.25451.107 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 9.0.4 [/usr/lib/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 10.0.0-rc.1.25451.107 [/usr/lib/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: DOTNET_BUNDLE_EXTRACT_BASE_DIR [/home/martin/.cache/dotnet_bundle_extract] global.json file: /home/martin/coding/martincostello/MyProject/global.json Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions