Reputation: 33
I have a C# based assembly with a class A for which I want to create some unit tests using MS Test in VS 2010. This assembly has a reference to a C++ CLI based assembly, and the class A above calls a managed class in the CLI assembly. When I try to play the test I get the following error: System.IO.FileNotFoundException: Could not load file or assembly 'XXX' or one of its dependencies. The specified module could not be found.
The unit test is inside a C# test project, and items deployment is not enabled.
All projects are configured to have a common output path, and I've checked that all assemblies are there.
Upvotes: 3
Views: 1103
Reputation: 49251
If it's a COM object, make sure it's registered with regsvr32
make sure that all the files are copied to output directory. (Sometimes the referenced C++/CLI will be copied, but not its dependencies aka unmanaged dlls)
Upvotes: 2