I am working on .NET 4 application which uses a VS2005 C++/CLI library. The tests around the C++/CLI library are custom console based test runners and are a little clunky. I have been trying to write some new tests using nunit.
The problem is that the console based application can load all dependent assemblies but Nunit complains that it cannot find assemblies (e.g. System.Runtime.Serialization.SerializationException : Unable to find assembly 'msvcm80, Version=8.0.50727.6195, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a').
I have ascertained that the console based application is loading the assembly at C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\mscvm80.dll and copied this file manually to the build directories and the test runner directory. This does not help.
Depends.exe tells me that GPSCV.DLL and IESHIMS.DLL cannot be found but that doesn't stop the console app from loading the dependencies so not sure if that is important.
Has anyone any tips on troubleshooting Nunit tests which have dependencies older C++/CLI libraries?
preguntado el 31 de julio de 12 a las 11:07
When I ran the nunit executable to the build output path my new tests ran successfully in nunit.
It looks as if this issue is simply a case of needing the required C++ DLLs in the same path as the nunit runner (or at least accessible to nunit). What is confusing is that the Module load exception thrown when the test is run from nunit run in another location names an assembly (msvcm80.dll) that is not required in the nunit path. The dependency tree is a little opaque for me anyway and this caused me alot of confusion.
The annoying thing about this is that I have to call nunit console through a batch script in Team City to run CI tests for this assembly rather than in the Team City nunit test runner (as we do for all the other tests).