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
I use this extension to launch the coverlet tool (not MSBuild version) and discovered that it appears the argument customization for coverlet needs a little tweak
The code is looking for the test dll using the provided configuration - but the way it passed it to the process doesn't work due to either coverlet or dotnet test - I dont know which.
Take for example this is how coverlet is currently run via this extension
Test run for C:\Projects\Common\Aggregates.NET\src\Aggregates.NET.UnitTests\bin\**Debug**\netcoreapp3.1\Aggregates.NET.UnitTests.dll (.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.8.3
Copyright (c) Microsoft Corporation. All rights reserved.
The test source file "C:\\Projects\Common\Aggregates.NET\src\Aggregates.NET.UnitTests\bin\**Debug**\netcoreapp3.1\Aggregates.NET.UnitTests.dll" provided was not found.
For some reason even though you provide the test assembly its still trying to detect it - and incorrectly assumes Debug configuration.
The fix is to supply --configuration Release to dotnet test via target args
the root problem is coverlet tool is using dotnet test but not figuring out to set --configuration so dotnet test is choosing debug by default.
If i was manually running the tool this is easy to fix so I don't think its a bug with coverlet - I think its a bug here because through cake and this extension i have no access to change the parameters to coverlet.
Something as simple as adding a Configuration property to CoverletSettings should suffice very nicely!
I use this extension to launch the coverlet tool (not MSBuild version) and discovered that it appears the argument customization for coverlet needs a little tweak
The code is looking for the test dll using the provided configuration - but the way it passed it to the process doesn't work due to either coverlet or dotnet test - I dont know which.
Take for example this is how coverlet is currently run via this extension
coverlet --target dotnet --targetargs "test --no-build" .\bin\**Release**\netcoreapp3.1\Aggregates.NET.UnitTests.dll
however this doesn't work
For some reason even though you provide the test assembly its still trying to detect it - and incorrectly assumes Debug configuration.
The fix is to supply
--configuration Release
to dotnet test via target argslike so
coverlet --target dotnet --targetargs "test --no-build --configuration Release" .\Aggregates.NET.UnitTests.csproj
The text was updated successfully, but these errors were encountered: