This question has been asked before perhaps multiple times, but I can't get the typical solution to work for me. The proposed solution is to put this in the "app.config" file:
<configuration>
<startup>
<supportedRuntime version="v4.0"/>
</startup>
</configuration>
But with a simple "Hello World" program, I still get the error: "Unable to find a version of the runtime to run this application.".
For some background, I'm using Windows XP (through Windows Virtual PC on Windows 7), and only installed the .NET 4.0 runtime on XP.
After some research, I found this page: http://msdn.microsoft.com/en-us/library/ee941656.aspx#core
It mentioned "If your application configuration file is named application-name.config, rename it to application-name.exe.config. For example, rename MyApp.config to MyApp.exe.config.".
I tried that, thinking it could solve the issue, but I still get "Unable to find a version of the runtime to run this application." when I try to run the .NET 3.5 (client profile or full) application on WinXP with .NET 4.0.