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.

Recent builds failing frequently with VsTest CodeCoverage Shim Method not found

See original GitHub issue

Type: 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).

logs_62888.zip

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:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
anshi03commented, May 27, 2020

@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. image

0reactions
Adebeercommented, May 25, 2020

@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.

Read more comments on GitHub >

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

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