Skip to content
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

Do not force 32-bit on 64-bit system under VS #2505

Closed
wants to merge 1 commit into from

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Aug 3, 2020

Description

Under VS we are running as 32-bit process which is affecting our logic that selects the correct
dotnet executor bittness based on the current process bitness and the architecture of the target
assembly. We want to run as 64-bit to choose x64 for AnyCPU assemblies when running under
VS on a 64-bit system.

But still run 32-bit when we run on 32-bit system, or when we run from 32-bit dotnet.

@nohwnd
Copy link
Member Author

nohwnd commented Aug 3, 2020

@Sanan07 Please review and link it to the AzDO bug you are looking into.

Tested :

C:\Projects\temp\mstest23> $env:vstest_runner_debug=1; C:\Projects\vstest\artifacts\Debug\net451\win7-x64\vstest.console.exe C:\Projects\temp\mstest23\bin\Debug\net5.0\mstest23.dll
Waiting for debugger attach...
Process Id: 828, Name: vstest.console
Microsoft (R) Test Execution Command Line Tool Version 16.8.0-dev
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '5.0.0-rc.1.20371.13' was not found.
  - The following frameworks were found:
      2.1.20 at [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
      3.0.2 at [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
etc...

After change and rebuild, vstest.console correctly runs as 64-bit and chooses the correct runtime:

C:\Projects\temp\mstest23> $env:vstest_runner_debug=0; C:\Projects\vstest\artifacts\Debug\net451\win7-x64\vstest.console.exe C:\Projects\temp\mstest23\bin\Debug\net5.0\mstest23.dll
Microsoft (R) Test Execution Command Line Tool Version 16.8.0-dev
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
  Passed TestMethod1 [3 ms]

Test Run Successful.
Total tests: 1

@nohwnd
Copy link
Member Author

nohwnd commented Aug 4, 2020

This breaks QTest execution. Closing and using OSBitness instead for selecting dotnet sdk version #2507. Adding note that this would break in the csproj.

@nohwnd nohwnd closed this Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants