How can I run vstest.console.exe in 32-bit mode using Visual Studio 2022?

Mahesh Kumar 40 Reputation points
2025-06-24T05:12:05.44+00:00

I’m working on a .NET solution that depends on a 32-bit native DLL. Due to this dependency, I need the test host process to run in 32-bit mode to avoid runtime issues.

However, I'm facing the following challenges:

  • I'm using Visual Studio 2022, which installs vstest.console.exe in Program Files (64-bit) only.

The vstest.console.exe version installed (v17.12.0) is 64-bit and does not accept the --x86 flag.

My solution and test projects are configured to target x86, and I’m passing in the .runsettings file — but the test host still launches as a 64-bit process.

I can't use Visual Studio 2019 because we're using Central Package Management (CPM), which is only supported in VS2022 and above.

My question:

Is there any supported way to:

Install or obtain a 32-bit version of vstest.console.exe for use with Visual Studio 2022?

Force vstest.console.exe in VS2022 to launch the test host in 32-bit mode (when the --x86 flag is not supported)?

Work around this limitation without reverting to an older VS version?

Any official guidance or workarounds would be appreciated.

Developer technologies | Visual Studio | Testing
{count} votes

Accepted answer
  1. HARDCORE GAMES™ 75 Reputation points
    2025-06-24T16:26:27.8966667+00:00

    Given Windows 11 is 64-bit only I figure MSFT will need to modernize Visual Studio a tad too.

    https://learn.microsoft.com/en-us/visualstudio/test/vstest-console-options?view=vs-2022

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.