I created a .NET Core 3.1 AnyCpu
Console Application using Visual Studio 2019 with the latest patches. The only code it contains is the boilerplate Console.WriteLine("Hello World!")
it was created with. I compile this and it runs fine on my Windows 10 x64 box.
I copy the Debug
folder over to my 32-bit Windows 7 box and attempt to run the Console Application. I get the following message. (The .Net Core 3.1 runtime is installed on the Windows 7 box).
The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
However, if I compile the Console Application using x86 then it runs fine on the Windows 7 box. With VS2019 and .NET Core 3/3.1 has AnyCpu
changed? I would have expected that code compiled for AnyCpu
should have worked fine under 32- and 64-bit.