xunit / visualstudio.xunit

VSTest runner for xUnit.net (for Visual Studio Test Explorer and dotnet test)
https://xunit.net/
Other
146 stars 81 forks source link

xunit.runner.msbuild x64 for cruise control #276

Closed Takoon68 closed 9 months ago

Takoon68 commented 3 years ago

Hi, a few month ago I desided to run my xunit tests (for a 32bit project) on cruise control so I followed the instructions on https://xunit.net/docs/getting-test-results-in-ccnet and everything worked fine. Now I changed the whole project to x64 and I'm getting the following error message:

"D:\Entwickl\PAMGlobal\PAMOS\packages\xunit.runner.msbuild.2.4.1\build\net452\PAMOS_XUnit_MSBuild.xml" (Standardziel) ( 1) -> (Test Ziel) -> D:\Entwickl\PAMGlobal\PAMOS\packages\xunit.runner.msbuild.2.4.1\build\net452\PAMOS_XUnit_MSBuild.xml(10,5): error : S ystem.BadImageFormatException: Die Datei oder Assembly "PAMOS.Core.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyTo ken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.

Translated: System.BadImageFormatException:Could not load file or assembly ..... or one of its dependencies. An attempt was ma de to load a program with an incorrect format..

I guess this happens cause xunit.runner.msbuild.net452.dll is 32bit. But how to get a x64 version of it?

bradwilson commented 1 year ago

xunit.runner.msbuild.net452.dll is compiled as AnyCPU, which means that it can be used in either 32- or 64-bit processes.

Here you can see the results of running corflags on it, and compared to xunit.console.exe (which is also AnyCPU) vs. xunit.console.x86.exe (which is 32-bit only). The 32BITREQ flag means "requires 32-bit":

image

It's likely that you have some other dependency which is marked as 32-bit only (perhaps even the tests themselves?) which is causing the problem.

bradwilson commented 9 months ago

Closing for lack of response. Please open a new issue if this is still a problem. Thanks!