running nunit tests (x86) with gallio

淺唱寂寞╮ 提交于 2019-12-25 01:46:17

问题


I am trying to run nunit tests with gallio.

These tests run with nunit-console-x86.exe

When I run them with nunit-console.exe, I am getting System.BadImageFormatException

Running with Gallio.Echo.exe (installed the x86 bundle from gallio.org), I am getting the same exception. Is there a way to get gallio to use the nunit-console-x86.exe?

I am running the command "C:\Program Files (x86)\Gallio\bin\Gallio.echo.exe" /r:IsolatedProcess "C:\projectdata.Tests.dll"

and I am getting this exception: Message System.BadImageFormatException : Could not load file or assembly 'projectdata, Version=8.2.0.17, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Update: I figured out this is because I have project.dll(x86) and project.test.dll(Any CPU).

Any Ideas on how I can get gallio.echo to work for this? Is it possible to get a Gallio.Echo-x86.exe?


回答1:


I was able to get it working by renaming the following files.

Gallio.Host.Elevated.exe --> Gallio.Host.Elevated.old.exe Gallio.Host.Elevated.x86.exe --> Gallio.Host.Elevated.exe

Gallio.Host.exe --> Gallio.Host.old.exe Gallio.Host.x86.exe --> Gallio.Host.exe

Note: You may want to create another copy of the gallio folder under program files to do this.

I have 2 copies. one in Program Files and one in Program Files (x86) with these changes.



来源:https://stackoverflow.com/questions/17112747/running-nunit-tests-x86-with-gallio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!