Coverlet collectors integration does not work on full framework projects
See original GitHub issueIn practice, it seems like coverlet is only compatible with analysing .net core projects? Could someone please confirm the current compatibility of Coverlet with respect to this bug https://github.com/microsoft/vstest/issues/2278
And update the project start page to reflect this would be great. I am trying to implement this on a .net full project, by calling vstest.console.exe directly with
$vstestconsolepath = “C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe”
$vsTestArguments = @( $testDlls #.net 4.6.2 “/logger:trx” “/InIsolation” “/collect:
"XPlat Code Coverage
”" “/TestCaseFilter:” + $testCaseFilters “/testadapterpath:” + (get-location).Path + "\packages\coverlet.collector.1.2.0\build\netstandard1.0" )
Microsoft (R) Test Execution Command Line Tool Version 16.4.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 2 test files matched the specified pattern.
Data collection : Data collector 'XPlat Code Coverage' threw an exception during type loading, construction, or initialization: System.FormatException: Input string was not in a correct format.
at System.Text.StringBuilder.FormatError()
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at Microsoft.VisualStudio.TestPlatform.Common.DataCollector.DataCollectionManager.LoadAndInitialize(DataCollectorSettings dataCollectorSettings, String settingsXml).
Data collection : Data collector 'XPlat Code Coverage' threw an exception during type loading, construction, or initialization: System.FormatException: Input string was not in a correct format.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top GitHub Comments
thanks @MarcoRossignoli. Your effort is greatly appreciated! 😃
@MarcoRossignoli Thank you! I found a blog post where he integrated it into teamcity via msbuild, so exactly what I was looking for and that worked. https://medium.com/@justingoldberg_2282/setting-up-code-coverage-with-net-xunit-and-teamcity-for-a-solution-with-multiple-test-projects-5d0986db788b