Code coverage fails after upgrading to VS 15.7.5
See original GitHub issueHi, I updated VS to version 15.7.5 released a few days ago and AxoCover stopped being able to show the coverage. To solve this, I created a new testing project with only the following test:
namespace UnitTestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
}
}
}
I already uninstalled completely VS and installed it again. AxoCover worked for a while, and then stopped working again. Here is the detailed output:
Executing tests… | Runner version is 1.1.389.0. | We are on x86 platform. SerializableException: Could not load file or assembly ‘AxoCover.Runner.XmlSerializers, Version=1.1.389.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) SerializableException: Could not load file or assembly ‘AxoCover.Runner.XmlSerializers’ or one of its dependencies. The system cannot find the file specified. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) | File redirection is enabled for the following files: | C:\Users\Pablo\AppData\Local\Microsoft\VisualStudio\15.0_6cc15c00\Extensions\ntrocxop.dn2\MSTestAdapter\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll | C:\Users\Pablo\AppData\Local\Microsoft\VisualStudio\15.0_6cc15c00\Extensions\ntrocxop.dn2\MSTestAdapter\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll | C:\Users\Pablo\AppData\Local\Microsoft\VisualStudio\15.0_6cc15c00\Extensions\ntrocxop.dn2\MSTestAdapter\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll | C:\Users\Pablo\AppData\Local\Microsoft\VisualStudio\15.0_6cc15c00\Extensions\ntrocxop.dn2\MSTestAdapter\Microsoft.VisualStudio.TestPlatform.TestFramework.dll | C:\Users\Pablo\AppData\Local\Microsoft\VisualStudio\15.0_6cc15c00\Extensions\ntrocxop.dn2\MSTestAdapter\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll | Setting up file redirection hooks… | File redirection hooks are enabled.
Loading assembly from C:\Users\Pablo\AppData\Local\Microsoft\VisualStudio\15.0_6cc15c00\Extensions\ntrocxop.dn2\MSTestAdapter\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll… || Loaded executor: Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.MSTestExecutor << Assembly loaded. Running executor: Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.MSTestExecutor… || Processing tests in: C:\Users\Pablo\SkyDrive\Documents\Visual Studio 2017\Projects\UnitTestProject1\UnitTestProject1\bin\Debug\UnitTestProject1.dll… SerializableException: Element not found. (Exception from HRESULT: 0x80070490) SerializableException: Could not load file or assembly ‘Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Deployment.AssemblyLoadWorker.GetTargetFrameworkVersionStringFromPath(String path) at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Deployment.AssemblyLoadWorker.GetTargetFrameworkVersionStringFromPath(String path) at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Utilities.AppDomainUtilities.GetTargetFrameworkVersionString(String testSourcePath) Passed UnitTestProject1.UnitTest1.TestMethod1 << Executor finished. | File redirection rules are cleared. < Test execution finished. Shutting down… Exiting… Generating coverage report… SerializableException: The I/O operation has been aborted because of either a thread exit or an application request at System.ServiceModel.Channels.SocketConnection.HandleReceiveAsyncCompleted() Committing… No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.
Test execution finished.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (2 by maintainers)
Top GitHub Comments
I was able to reproduce it on my other machine. You are right it is indeed OpenCover. The problem is that it’s DLL registration does not work anymore - probably because of some change in Windows. Fortunately I have found a workaround for now:
Now your coverage will run again. I will check at the weekend to make this automatically in AxoCover, while OpenCover gets fixed. Or check if I can fix OpenCover myself.
We’re getting the same error since we’ve updated our machines to the latest windows 10 updates. I’m guessing the issue is with OpenCover and not AxoCover but nothing has been reported on their Issues page yet.