Hi Clayton. There are a couple of ways to force your .NET application to run in 64-bit mode:
Build a 64-Bit .NET Version
If you use Microsoft’s Visual Studio, the build configuration is likely be set to Any CPU (the default):
This will produce an executable that will run in either 32-bit or 64-bit mode, depending on the version of .NET available.
To run your executable in 64-bit only, change the configuration to x64 and rebuild.
If your project doesn’t have a x64 configuration, create one like this:
Select Build > Configuration Manager…
In the Configuration Manager,
Click the OK button to record your changes. Close the Configuration Manager
Use CorFlags to Force .NET 64-Bit
If your application is built with “Any CPU” but you can’t rebuild it in Visual Studio, Microsoft’s free CorFlags utility will come to the rescue.
Corflags.exe is distributed with the Windows 10 SDK. Be sure to select the “.NET Development Tools” component when installing.
We actually found the CorFlags exe file in a couple of places on our hard drive:
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\Corflags.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\Corflags.exe
You may find CorFlags in older .NET SDK installations as well — it has been around since the release of .NET 2.0 (2005).
Once you have located CorFlags:
Make a copy of the executable you want to run in 64-bit. The application we used for testing is called SystemInfoDotNet.exe, so we copied it to SystemInfoDotNet64.exe.
Open a command prompt with admin rights.
CD to the folder containing the copied application.
The copied executable will always run in 64-bit mode.
Best of luck with your .NET application Clayton!