Resharper Unit Test Sessions In Xunit Framework reports "Inconclusive: Test not run" with error message "The specified executable is not a valid application for this OS platform."
Environment:
Vs 2017 update 3: VisualStudio.15.Release/15.3.4+26730.15
Resharper : JetBrains ReSharper Ultimate 2018.2.2 Build 182.0.20180908.72422
OS: Windows 7 SP1, 32 bit
The Problem:
I created c# class library Unit Test project net46 for Xunit Framework and referencing xunit packages, as given below:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<!-- <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" /> -->
</ItemGroup>
</Project>
When clicking the Resharper menu: run unit test, Test Window show:
>ClassLibrary1 (2 tests) Inconclusive
ClassLibrary1 (2 tests) Inconclusive
Class1zz (2 tests) Inconclusive: Test not run
FailingTestzz Inconclusive: Test not run
PassingTestzz Inconclusive: Test not run
with the error message:
> ERROR System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at JetBrains.ReSharper.UnitTestFramework.Processes.PreparedProcess.Start()
at JetBrains.ReSharper.UnitTestFramework.Strategy.TaskRunnerOutOfProcessUnitTestRunStrategy.Run(IUnitTestRun run)
WARN Element ClassLibrary1.Class1zz was left pending after its run completion.
WARN Element ClassLibrary1.Class1zz.PassingTestzz was left pending after its run completion.
WARN Element ClassLibrary1.Class1zz.FailingTestzz was left pending after its run completion.
Rebuilding doesn't help, nor does closing and re-opening Visual Studio.
After hours, thinking in the strange message 'The specified executable is not a valid application for this OS ',
I Modified the Configuration of the project from AnyCpu to X86 (the platform of windows OS I use ), and I was surprised that it's working fine
BTW, I can run the netcoreapp2.0 Xunit without problems from Resharper (in windows 32 bit).
I suspect something wrong in the packages I reference in the project in Xunit framework (may be missed package or wrong version for Full dotnet framework.
OR,
The root problem may be that Resharper run by default in 'AnyCpu' configiration in vs 2017 (JetBrains.ReSharper.TaskRunner.CLR45.x64.exe) not taking into account that current OS may be windows 32bit.
Let me know if this's a bug or something missed to do.
Thanks
Please sign in to leave a comment.