Problems running unit test in Visual Studio

When I run the Release build of my (VS 2008.NET) unit tests, I get the following exception:

System.IO.FileLoadException: Could not load file or assembly 'arcVegaORM, Version = 1.0.3856.24327, Culture = neutral, PublicKeyToken = 0dd85ae1d99ddbee' or one of its dependencies. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

I do not get an exception when I run debug build tests.

The unit test structure copies the old version of the arcVegaORM assembly into the TestResults \ Out folder. I don’t know where it comes from the old version - it does not match the version in the bin \ Release folder.

I'm starting to think that there is a bug with the VS.NET unit test infrastructure and that it has an older version cached.

+5
source share
2 answers

Now I found a message on the MSDN forums - this seems to be an error:

http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/af530ba8-1299-4113-a5fe-4f6b009fa599

!! If I turn off code coverage, then the tests will work fine !!

+1
source

One check would be GAC(global build cache). You can do this by opening Windows Explorer and typing c: \ windows \ assembly in the address bar (if your OS is installed on drive c).

Perhaps this is an assembly from the GAC.

Other things to do is clear the solution and rebuild everyone to make sure you don't have old assembly references.

, -, IIS, C:\WINDOWS\Microsoft.NET\Framework\framework_version\Temporary ASP.NET Files.


, , - . . , , , .

- , , , . , dll , , .

Tip2
, , A xxx B, C yyy B. , . DLL Hell. , . .

+2

All Articles