.net-core

how to run a .NET Core project in 32-bit mode


How can you force dotnet to run a project in 32-bit mode on a Windows 10 64-bit machine? Both dotnet restore and the dotnet build support a --runtime switch, e.g.:

dotnet restore --runtime win-x86
dotnet build --runtime win-x86

The dotnet run sub-command however does not support a --runtime switch.


Solution

  • There is a runtime option for dotnet run now.

    To execute as x86:

    dotnet run -r win-x86