开发者

using Visual Studio 2008 to test an x64 .NET binary

I have an x64 managed C++ class that needs to be tested using Visual Studio 2008. This class links to a x64 unmanaged lib

I'm not able to run my my tests because vstesthost.exe (the exe Visual Stud开发者_如何学运维io hosts my test) is x86 and not x64.

Ideas? the error generated is

rror: System.BadImageFormatException: Could not load file or assembly ... or one of its dependencies. An attempt was made to load


The testing tools in VS2008 do not support 64-bit binaries. This support has been added in VS2010, however. I don't know of any good workarounds besides the obvious of building your binary for x86.


Add some break (such as MessageBox) in your initialization part, so the application stops at start up. Then you can use Visual Studio to attach to its process. Then you can continue debugging in x64 mode.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜