Recent builds failing frequently with VsTest CodeCoverage Shim Method not found
See original GitHub issueType: BUG
Enter Task Name: VsTest
Environment
Server:
Azure Pipelines
alsdevelopmentna.visualstudio.com/AngleNextGen%20Core%20Product%20Pipeline
Build: AnglePlus-Dev, 20200501.1 Pool: Azure Pipelines Image: windows-2019 Agent: Hosted Agent
Issue Description
Below error seem to have started few days ago - have to repeat builds 2-3 times WITHOUT changes until it succeeds. Occurs during VsTest code coverage shim process - unable to find method (probably reflection based).
Error logs
##[error]An exception occurred while invoking executor 'executor://xunit/VsTestRunner2/netcoreapp': Method not found: 'Void Microsoft.VisualStudio.CodeCoverage.Shim.546367543__coverage_runtime_method__26351_18082__(UInt64)'.
##[debug]Processed: ##vso[task.logissue type=error;]An exception occurred while invoking executor 'executor://xunit/VsTestRunner2/netcoreapp': Method not found: 'Void Microsoft.VisualStudio.CodeCoverage.Shim.546367543__coverage_runtime_method__26351_18082__(UInt64)'.
Microsoft (R) Coverage Collection Tool Version 16.0.30319.200
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
"VSTest" task failing since few days - Visual Studio Feedback
Our unit tests are failing starting yesterday. Last Friday everything was still working. The VSTest task prints the following relevant output:
Read more >Code coverage results not being reported after Visual Studio ...
I have a very simple project in my VSTS account with a few tests. I've added a VsTest step to the build and...
Read more >IIS CodeCoverage - Occasional Method Not Found - MSDN
Failed to unregister 'w3wp.exe', this process will be launched using DEBUG_PROCESS flag. The behavior of application might be different. And ...
Read more >is throwing Microsoft.VisualStudio.CodeCoverage.Shim dll ...
using - $PATH_tool\VsTest\16.0.1\x64\tools\net451\Common7\IDE\Extensions\TestPlatform>vstest.console.exe DLL_NAMES /InIsolation ...
Read more >Microsoft.CodeCoverage 17.4.1 - NuGet
Version Downloads Last updated
17.5.0‑preview‑20221221‑03 1,381 4 days ago
17.5.0‑preview‑20221003‑04 94,568 3 months ago
17.4.1 244,990 10 days ago
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 Free
Top 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
@Adebeer As a wokaround for this issue , please set adapther Paths in your Vstest Task to some dummy folder in your repo which does not have any dlls (any child folder also should not have dll). Basically any folder with only code files or something like that.
@anshi03 Here’s a link to our pipeline build
Not sure if it matters, but late last week (20th May) I upgraded some nuget packages - specifically, Microsoft.NET.Test.Sdk from 16.5.0 to 16.6.1 - I don’t recall seeing it since then but we may simply not have pushed through enough builds.