-->

running nunit tests (x86) with gallio

2019-08-30 14:53发布

问题:

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.