Unable to read beyond the end of the stream
See original GitHub issueHi,
every now and then we get the following error:
Test Run Successful.
07:15:22
Total tests: 23
07:15:22
Passed: 23
07:15:22
Total time: 31.4479 Seconds
07:15:22
07:15:22
Calculating coverage result...
07:15:22
C:\Users\teamcity\.nuget\packages\coverlet.msbuild\2.8.1\build\coverlet.msbuild.targets(36,5): error : Unable to read beyond the end of the stream.
07:15:22
C:\Users\teamcity\.nuget\packages\coverlet.msbuild\2.8.1\build\coverlet.msbuild.targets(36,5): error : at System.IO.BinaryReader.InternalRead(Int32 numBytes)
07:15:22
C:\Users\teamcity\.nuget\packages\coverlet.msbuild\2.8.1\build\coverlet.msbuild.targets(36,5): error : at Coverlet.Core.Coverage.CalculateCoverage() in c:\git\coverletToRelease\src\coverlet.core\Coverage.cs:line 355
07:15:22
C:\Users\teamcity\.nuget\packages\coverlet.msbuild\2.8.1\build\coverlet.msbuild.targets(36,5): error : at Coverlet.Core.Coverage.GetCoverageResult() in c:\git\coverletToRelease\src\coverlet.core\Coverage.cs:line 137
07:15:22
C:\Users\teamcity\.nuget\packages\coverlet.msbuild\2.8.1\build\coverlet.msbuild.targets(36,5): error : at Coverlet.MSbuild.Tasks.CoverageResultTask.Execute() in c:\git\coverletToRelease\src\coverlet.msbuild.tasks\CoverageResultTask.cs:line 113
We have a solution with multiple projects, but this happens not always at the same project.
Coverlet version: coverlet.msbuild:2.8.1 Test SDK version: Microsoft.NET.Test.Sdk:16.5.0
I’ve seen issues with the same problem here, but none of the solutions worked so far.
Best regards, Daniel
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
c# - Im getting error Unable to read beyond the end of ...
A more common solution is to write the number of int s that you are saving in a binary file in front of...
Read more >Unable to save "unable to read beyond the end of the stream"
Does anyone know what the "unable to read beyond the end of the stream" error is when trying to save a report?
Read more >Issue - Unable to read beyond the end of the stream
The 'unable to read beyond end of the stream' might be due to a corrupted file. There's also a 2nd issue that happens...
Read more >dotnet test crashes with System.Exception: Unable to read ...
Exception: Unable to read beyond the end of the stream if code under tests calls System.Environment.Exit #3658.
Read more >Error: Unable to read beyond the end of the stream
This is usually caused by a corrupted Gene Model file, but is easily fixed. Solution: Re-sync Gene Model Files with Server. To resolve...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re hitting know issue https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/KnownIssues.md#1-vstest-stops-process-execution-earlydotnet-test You should use collectors integration https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md (released
1.3.0
version some days ago so update the reference).@jeoffm can you open another issue?This is solved.
You MUST use collectors only integration if you want to avoid this issue, no msbuild reference. Follow this guide https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md and this sample https://github.com/coverlet-coverage/coverlet/tree/master/Documentation/Examples/VSTest/HelloWorld