Skip to content

.NET 10 RC1: dotnet test calls fail when parameters end with .exe or .dll #51235

@boris-yakhno

Description

@boris-yakhno

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:

  1. Create a test project.
  2. Ensure the 10.0.100-rc.1.25451.107 .NET SDK is used for dotnet calls.
  3. Run dotnet test -p:a=b -p:foo=bar.exe or dotnet 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 .exe or .dll are 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 build is called instead of dotnet test.

Reproduction with an .rsp file:

  1. Create a test project.
  2. Create an rsp.rsp file with the following content:
    /noconsolelogger
    -p:foo=bar.exe
    
  3. Ensure the 10.0.100-rc.1.25451.107 .NET SDK is used for dotnet calls.
  4. Run dotnet test @rsp.rsp on macOS or dotnet test `@rsp.rsp on 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 .exe or .dll are provided, e.g. the .rsp file contains the following parameter: -p:foo=bar.txt.
  • The parameter ending with .exe or .dll is enclosed in quotes, e.g. the .rsp file 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 build is called instead of dotnet 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions