running nunit tests (x86) with gallio

2019-08-30 14:26发布

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条回答
闹够了就滚
2楼-- · 2019-08-30 14:55

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.

查看更多
登录 后发表回答