You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to have the developer's local build and CI build as closely aligned as possible, I set the <VSTestLogger> property in a Directory.Build.targets file like this
<Project>
<PropertyGroupCondition=" '$(IsTestProject)' == 'true' ">
<!-- Enable test logging to TRX files and place them in the artifacts directory -->
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
</PropertyGroup>
</Project>
In CI this is fine because build and test generally only happens once. However, when running locally, subsequent test runs show this warning:
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
WARNING: Overwriting results file: C:\path\to/TestResults/net8.0\Moq.Analyzers.Test.trx
Results File: C:\path\to/TestResults/net8.0\Moq.Analyzers.Test.trx
In this scenario, overwriting the test results file is expected. The warning is raised @
Checkout 089a203444a06ecbf18415a21a24b2a943aede62 in case the repo changes
dotnet test
dotnet test
Expected behavior
No warnings
Actual behavior
Overwrite warning
Environment
vstest.console.exe 17.0.34804.30
dotnet 8.0.300
Windows 23H2 22635.3790
The text was updated successfully, but these errors were encountered:
MattKotsenas
changed the title
Unsuppressable overwrite warning when using <VSTestLogger> MSBuild property confuses users
Unsuppressable overwrite warning when using <VSTestLogger> MSBuild property which confuses users
Jul 2, 2024
Description
In order to have the developer's local build and CI build as closely aligned as possible, I set the
<VSTestLogger>
property in aDirectory.Build.targets
file like thisIn CI this is fine because build and test generally only happens once. However, when running locally, subsequent test runs show this warning:
In this scenario, overwriting the test results file is expected. The warning is raised @
vstest/src/Microsoft.TestPlatform.Extensions.TrxLogger/TrxLogger.cs
Lines 452 to 456 in a1f5a65
In this particular case the warning is benign, however:
Steps to reproduce
This should be reproducible just from the snippets provided as context, but for a full example:
Expected behavior
Actual behavior
Environment
vstest.console.exe 17.0.34804.30
dotnet 8.0.300
Windows 23H2 22635.3790
The text was updated successfully, but these errors were encountered: