-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Repro steps:
- Use a repo using the new dotnet test MTP mode. (
"runner": "Microsoft.Testing.Platform"in global.json) - Open a solution in VS and save it as a solution filter (Example.slnf) in a different directory.
e.g.:
{
"solution": {
"path": "..\\Example.slnx",
"projects": [
"tests\\Example.Tests.csproj"
]
}
}- Run tests in the new filter using
dotnet test --solution <path to slnf file>in linux
Result:
This error appears: Could not find solution or directory /<path to slnf file>\Example.slnx.
VS always seems to create solution filters with backslashes in the path.
dotnet build can resolve these on linux, but dotnet test --solution ... can't.
Manually changing the path to the solution by using forward-slashes fixes this.
Also note that this is only an issue for the path to the solution file itself. There are no issue when the path to the filtered projects contain a backslash.
Using .NET SDK 10.0.100-rc.2 on Arch (WSL)
dotnet --info:
Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/10.0.100-rc.2.25502.107/
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
Host:
Version: 10.0.0-rc.2.25502.107
Architecture: x64
Commit: 89c8f6a112
.NET SDKs installed:
8.0.415 [/usr/share/dotnet/sdk]
9.0.306 [/usr/share/dotnet/sdk]
10.0.100-rc.2.25502.107 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.21 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-rc.2.25502.107 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.21 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-rc.2.25502.107 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
/mnt/e/ws/Bshox/global.json
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download