question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] vstest.console.exe --collect:"XPlat Code Coverage" throw System.FormatException

See original GitHub issue

vstest.console.exe --collect:"XPlat Code Coverage" throw System.FormatException

vstest.console.exe --collect:"XPlat Code Coverage" C:\Users\Marco\Downloads\test\XUnitTestProject1\bin\Debug\net472\XUnitTestProject1.dll
...
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).
...

We had a request on coverlet repo https://github.com/tonerdo/coverlet/issues/652 to use “Visual Studio Test task” https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/vstest?view=azure-devops

cc: @vagisha-nidhi

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
MarcoRossignolicommented, Oct 11, 2020

@nohwnd @jakubch1 can someone please take a look at this and tell me if we can compile for netstandard? We want to allow to .NET Framework apps to use collectors to avoid “early process kill” msbuild issue. Some more info https://github.com/coverlet-coverage/coverlet/issues/705#issuecomment-586733191

Feel free to reach me off line also, thanks guys!

1reaction
MarcoRossignolicommented, Jan 19, 2021

@nohwnd @Adanaran we released version 3.0.1 and in a week we’ll release 3.0.2 due to some regression.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vstest.console not createing Code Coverage report
Data collector 'Code Coverage' message: Cannot find CodeCoverage.exe.. but its where others see it: D:\Program Files (x86)\Microsoft Visual ...
Read more >
vstest.console throws System.IO.FileNotFoundException
With an msbuild task I'm collecting all the unit tests assemblies and run vstest.console.exe to test these assemblies.
Read more >
Error reading the version of vstest.console.exe
console.exe is found by the build agent on the CI server. It is NOT able to run code coverage on the test cases...
Read more >
Setting up code coverage with .Net, xUnit and TeamCity for ...
Where I work we have a system with over 2.5 mil lines of code (…we have ... your tests but no extras like...
Read more >
Code coverage with VS Test and Coverage Validator
First, let's discuss the program we're going to launch and the program we're going to monitor. vstest.console.exe. VS Tests are run by vstest....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found