Skip to content

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Oct 16, 2025

Fixes #51249
Fixes #50923

Before the fix, the added test will fail:

    Expected result.StdOut "VSTest version 18.0.0 (x64)" to contain "error MSB1021: Cannot create an instance of the logger my.dll.".

In case of failure, StdErr will also contain:

The argument --property:VsTestUseMSBuildOutput=false is invalid. Please use the /help option to check the list of valid arguments.

This fixes a regression from #50926


Description

This fixes a regression in .NET 10 GA for parsing dotnet test command for VSTest and deciding whether we should forward to MSBuild and VSTest. If an MSBuild distributed logger is used where the value ends with .dll, we incorrectly considered that the given dll is an assembly we want to run tests for, and we offloaded the work to VSTest instead of MSBuild

Customer impact

Issue was reported by customer in #51249. There is some CI scenario that runs the following:

/Users/builder/azdo/_work/2/s/.dotnet/dotnet test "/Users/builder/azdo/_work/2/s/src/Graphics/tests/Graphics.Tests/Graphics.Tests.csproj" --logger "trx;LogFileName=Graphics.Tests-Debug.trx" --logger "console;verbosity=normal" --configuration Debug --results-directory "/Users/builder/azdo/_work/2/a/test-results" -dl:CentralLogger,"/Users/builder/azdo/_work/2/s/artifacts/msbuildlogger/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"/Users/builder/azdo/_work/2/s/artifacts/msbuildlogger/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /bl:/Users/builder/azdo/_work/2/a/logs/Graphics.Tests-Debug.binlog /p:VStestUseMSBuildOutput=false

The -dl part that ended with .dll was causing issues due to incorrect parsing.

Regression

Yes

Testing

Added automated test.

Risk

Low

@Youssef1313
Copy link
Member Author

Approved via email.

@akoeplinger akoeplinger merged commit f6115a4 into release/10.0.1xx Oct 17, 2025
30 of 31 checks passed
@akoeplinger akoeplinger deleted the dev/ygerges/dotnet-test-parse branch October 17, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants