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.
From the BUILD menu in Visual Studio, select Configuration Manager. From the Active solution platform drop-down list, select New. The New Solution Platform dialog displays. In the Type or select new platform combination box, select x64.
NET Core SDK and runtimes. In almost all cases the right version of the SDK to download and is the 64 bit version unless you are running on 32 bit Windows version (hopefully not).
dotnet run
does not have --runtime
/-r
support but dont give up bro, there is a hope!
If you want only run in 32 bit you can easly use for example dotnet your_app.dll
after build to 32 bit (by publish
or build
). dotnet run
command running application from the source code
If you want force x86 in VS go to the Properties > Build
and change Platform target
from Any CPU
to x86
There is a runtime option for dotnet run
now.
To execute as x86:
dotnet run -r win-x86
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With