-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running tests as x86? #1128
Comments
vstest picks up the dotnet.exe from the path. If that exe happens to have a bitness of 64 bit, then the tests will not honour x86 settings. This behaviour is the same as trying to launch an x86 app with the x64-based dotnet.exe. |
Well, it looks like regression for me. MSTest runner does support target platform selection, NUnit runner has |
UPD |
@ig-sinicyn vstest does work as advertised for |
@codito thanks! |
I am not sure if there's a clean way. Default installers usually push the Another way is to specifically install the |
Okay, to summarize: for dotnet command there is no way to select target platform (x86|x64) to run. Thanks again, will use direct paths. |
Looks like after #2161 was merged, there is only one component to fully support |
And it seems that has come back with 16.8.0 Preview 1 |
@AndrueCope you are right, this has been a long running issue. We were fixing it for 32-bit windows and broke it in visual studio, and vstest.console but it works under dotnet test (or will once preview8 is available, or if you are using net5.0-rc1). We already fixed this in 16.8-preview2. You can work around the issue by specifying the /platform switch in command line, or in VS click the cog in Test Explorer and setting the platform for anycpu projects. |
Oh, I didn't see that option. Thank you. I'm in the process of upgrading one of our dependencies so we might be able to move away from targeting x86 finally. I've been programming since the 1980s and when this cropped up it struck me as unfunny that x86 was still a thing in 2020 :) |
Description
It looks like
dotnet vstest
does not honor--platform:x86
switchSteps to reproduce
dotnet vstest bin\Release\netcoreapp2.0\MsUnitTestProject1.dll --platform:x86
Expected behavior
Test should run without errors
Actual behavior
Test fails with
I've tried to add
to the csproj. In that case test run fails with
message.
Environment
Win 10 x64 (with all updates), VS 2017.3.5 + net core sdk 2 installed.
Code: MsUnitTestProject1.zip
The text was updated successfully, but these errors were encountered: