NCover unable to load .NET assemblies

NCover unable to load .NET assemblies

MSTest based tests with binaries built with VS 2010 and .NET 4.

I have a rake build script that runs the unit tests with no problem. I created a new block for NCover for testing NCover.

I tried both x86 and x64 versions of NCover with the same results.

Error output at the bottom of the post.

I've tried both the console and Explorer with the same results.

Test machine is x64, the binaries are x86. I have several apps that are working fine in a similar manner: mstest, fxcop and fitnesse.

I've tried everything from the following pare: http://docs.ncover.com/how-to/running-ncover-with-your-unit-testing-framework/mstest/

So... ANy ideas on what to try now?

--------------------------- Error Output ---------------------- NCover Complete Trial v3.4.18.6937 x86 Copyright (c) 2007 - 2010 Gnoso Inc. License Key: 7LWLSY3I9CE8SPDN Registered to Customer #: 70269 for 1 Machine 21 days left in the trial period.

Setting the //pn argument to 'vstesthost.exe;qtagent32.exe;qtagent.exe' in an attempt to gather coverage data. To prevent this behavior, use the //literal argument.

Command: C:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/MSTest.exe Command Args: /testcontainer:FileImportLib.Test.dll Working Directory: C:/Jenkins/.hudson/jobs/FileImport/workspace/File Import/MAINLINE/FileImportLib.Test/bin/Release Assemblies: (All Loaded Assemblies)

Program Output Microsoft (R) Test Execution Command Line Tool Version 9.0.21022.8 Copyright (c) Microsoft Corporation. All rights reserved.

Loading FileImportLib.Test.dll... FileImportLib.Test.dll Could not load file or assembly 'file:///C:\Jenkins.hudson\jobs\FileImport\workspace\File Import\MAINLINE\FileImportLib.Test\bin\Release\FileImportLib.Test.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

End Program Output

No data was collected For more information on this error, see http://www.ncover.com/lt/no-data

NCover.Console is returning exit code #20000


RE: NCover unable to load .NET assemblies

Hi chooks,

Even though we're addressing this issue directly through support, I'll leave this post active for a while so that I can post a solution, or in the event that other forum users also have some feedback.

I will, however, mark what appears to be a duplicate of this post as answered.

Thanks!

NCover Support


RE: NCover unable to load .NET assemblies

This was actually an MSTest error, not an NCover error.

The problem was caused by inadvertently running MSTest 9 against an assembly built for .NET 4.0.

When the user ran MSTest 10 against the same .NET 4.0 assembly, the process completed without error.

NCover Support