Closed mchechulnikov closed 1 year ago
Hi @mchechulnikov, thanks for reporting this issue. I will check if that's a duplicate of the linked issue or another problem that we missed. Please stay tuned.
I'm able to reproduce it also without .rsp files but just using MSBuild switches in command line using .NET SDK 7.0.101 on macOS.
Using de
❯ dotnet test -p:abc=123
Befehl oder Argument "-p:abc=123" nicht erkannt
with en
everything works well
❯ dotnet test -p:abc=123
Determining projects to restore...
All projects are up-to-date for restore.
...
Maybe this is a duplicate of #29543 (or the other way around as this one is older, but #29543 is a bit more generic)? The error message seems to be the same and it also only occurs if the language is not en
.
Not sure because we have faced with an original issue in 7.0.100, not 7.0.101.
But looks like these problems could have the same origin.
But also it looks like #29559 could help 🤞
We confirm that this is the same issue as #29543 and that it will be fixed by #29559
cc: @baronfel
Copying the text from the latest PR update here:
I think we're in a good space now with the algorithm and the tests for this check. I'll want to get another check from @dsplaisted to make sure he's comfortable with the implementation, but then we're ready to go.
A note about the timing of this fix: we are already beyond the merge window for the January servicing release of .NET 7 (which would be 7.0.102) due to the holiday season. As a result, this fix (when approved and merged) will only be available in the Februrary servicing release at earliest (so 7.0.103). This feels really bad, and isn't a great response time given the very fast time to reporting that users had, but it's the best I can do.
In the meantime, the best thing I can suggest for users that are hitting this error is to force the CLI to the English local for
dotnet test
. The easiest way to do that is to set theDOTNET_CLI_UI_LANGUAGE
environment variable in your shell toen-US
for the duration of the test command. e.g. in Bash you'd runDOTNET_CLI_UI_LANGUAGE='en-us' dotnet test .....
. Full documentation for this environment variable can be found here.
I'm going to close as duplicate of https://github.com/dotnet/sdk/issues/29543
Description
dotnet test
command cannot parse parameters from provided .rsp file if .NET CLI language isde
orru
but works fine withen
on .NET SDK 7.0.100. It leads to an errorUnrecognized command or argument ...
This bug is not reproducible on the .NET SDK 6.0.402.
To Reproduce
net7.0.
(please, check test project detail below)DOTNET_CLI_UI_LANGUAGE
to valuede
(German). In PowerShellgives
Usage: dotnet test [<PROJECT | SOLUTION>] [options] [[--]...]]
Arguments: <PROJECT | SOLUTION> Das Projekt oder die Projektmappendatei, die verwendet werden soll. Wenn keine Datei angegeben ist, durchsucht der Befehl das aktuelle Verzeichnis nach einer Datei.
Options: ...
gives
Starting test execution, please wait... A total of 1 test files matched the specified pattern.
Passed! - Failed: 0, Passed: 100, Skipped: 0, Total: 100, Duration: 13 ms - xUnit.Tests.dll (net7.0)
UnitTests0.cs content
Content ``` C# namespace xUnit.Tests; public class UnitTest0 { [Fact] public void Test0() { Assert.True(true); } ... // I have 100 same tests } ```Usings.cs content
Content ``` c# global using Xunit; ```1.rsp content
Content ``` -p:abc=123 ```Further technical details
`dotnet --info` output:
``` .NET SDK: Version: 7.0.100 Commit: e12b7af219 Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.100\ Host: Version: 7.0.0 Architecture: x64 Commit: d099f075e4 .NET SDKs installed: 3.1.424 [C:\Program Files\dotnet\sdk] 6.0.401 [C:\Program Files\dotnet\sdk] 6.0.402 [C:\Program Files\dotnet\sdk] 7.0.100 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-rc.2.22472.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Other architectures found: x86 [C:\Program Files (x86)\dotnet] Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download ```