-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
In the 10.0.100-rc.1.25451.107 .NET SDK, dotnet test calls fail if provided with parameters that end with .exe or .dll. This happens when providing the parameters directly as arguments to dotnet test and when providing them through an .rsp file, but with some differences. This does not happen on SDK versions 6-9.
This is a problem for us in JetBrains TeamCity, as it breaks existing integrations with dotnet test.
To Reproduce
Reproduction with command line arguments:
- Create a test project.
- Ensure the
10.0.100-rc.1.25451.107.NET SDK is used fordotnetcalls. - Run
dotnet test -p:a=b -p:foo=bar.exeordotnet test -p:a=b -p:foo=bar.dll.
Expected result: dotnet test succeeds.
Actual result: dotnet test fails with exit code 1 and the following output – The argument -p:a=b is invalid. Please use the /help option to check the list of valid arguments.
In the following cases, the call succeeds:
- No parameters ending with
.exeor.dllare provided, e.g.dotnet test -p:a=b -p:foo=bar.txt. - .NET SDK 6-9 is used (tested with versions
6.0.414,7.0.401,8.0.301,9.0.100). dotnet buildis called instead ofdotnet test.
Reproduction with an .rsp file:
- Create a test project.
- Create an
rsp.rspfile with the following content:/noconsolelogger -p:foo=bar.exe - Ensure the
10.0.100-rc.1.25451.107.NET SDK is used fordotnetcalls. - Run
dotnet test @rsp.rspon macOS ordotnet test `@rsp.rspon Windows.
Expected result: dotnet test succeeds.
Actual result: dotnet test fails with exit code 1 and the following output – The argument /noconsolelogger is invalid. Please use the /help option to check the list of valid arguments.
In the following cases, the call succeeds:
- No parameters ending with
.exeor.dllare provided, e.g. the.rspfile contains the following parameter:-p:foo=bar.txt. - The parameter ending with
.exeor.dllis enclosed in quotes, e.g. the.rspfile contains the following parameter:-p:foo="bar.exe". - .NET SDK 6-9 is used (tested with versions
6.0.414,7.0.401,8.0.301,9.0.100). dotnet buildis called instead ofdotnet test.
Further technical details
Tested on macOS arm64 15.6.1 and Windows x64 10.0.26100.
details of 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: Mac OS X
OS Version: 15.6
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/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: arm64
Commit: 2db1f5ee2b
.NET SDKs installed:
6.0.414 [/usr/local/share/dotnet/sdk]
7.0.102 [/usr/local/share/dotnet/sdk]
7.0.401 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]
8.0.301 [/usr/local/share/dotnet/sdk]
9.0.100 [/usr/local/share/dotnet/sdk]
10.0.100-rc.1.25451.107 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-rc.1.25451.107 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-rc.1.25451.107 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
x64 [/usr/local/share/dotnet/x64]
Environment variables:
Not set
global.json file:
/[path-to-project]/TestProject1/global.json