开发者

MS Test fail to load C++ CLI assemblies

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.开发者_Python百科 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.


  1. If it's a COM object, make sure it's registered with regsvr32

  2. 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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜