Application.exe is not a valid Win32 application error

I wrote a Console application that the client is trying to run on their Windows Server 2003 R2 machine , and they get this error message.

If I go to Build -> Configuration Manager, all my projects will be installed in Platform of "Any CPU" and Configuration

 "Release" 

What else could I skip? They don’t want to actually launch the console application by double-clicking on it; they want to give it to the Windows schedule tasks so that they can pick it up at a specific time

+7
c # visual-studio-2012 windows-console
source share
1 answer

Starting with .NET 4.5, the compiler generates an EXE that is marked as compatible only with Windows version 6.0 and higher. Vista and above. Such an executable file does not start immediately when launched on XP and Server 2003; it is Windows version 5.0. You will get this error before you can say that .NET 4.5 is not installed on the computer.

You should target .NET 4.0 or less. The same requirement for any DLLs you depend on, including unmanaged ones. More on this in this post .

+25
source share

All Articles