开发者

BadImageFormatException while using nUnit for COM object wrapper test

开发者 https://www.devze.com 2023-03-17 15:55 出处:网络
I\'m going to refactor a piece of overcom开发者_开发百科plicated code and I want to do it in a safe manner. In order to do it I have written an unit test. But I can\'t use the test because it always f

I'm going to refactor a piece of overcom开发者_开发百科plicated code and I want to do it in a safe manner. In order to do it I have written an unit test. But I can't use the test because it always fails with a BadImageFormatException:

Could not load file or assembly 'XXX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ZZZ' or one of its dependencies. An attempt was made to load a program with an incorrect format.

The XXX assembly is a proxy-assembly of the COM object. It is added as a refence to the project containing the test.

Currently I use the nUnit 2.5.7.

Couldn't anyone point me how can I solve the problem please?

Thanks in advance!


Seems that your application is running under .NET 4.0, and NUnit - under .NET 2.0

See this: NUnit isn't running Visual Studio 2010 code

0

精彩评论

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