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.

Unable to read beyond the end of the stream

See original GitHub issue

Hi,

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:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
MarcoRossignolicommented, Jun 14, 2020
0reactions
MarcoRossignolicommented, Feb 21, 2021

@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

Read more comments on GitHub >

github_iconTop 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 >

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