This question has been asked earlier than several times, but I cannot get a typical solution to work for me. The proposed solution should 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 message: "Could not find a version of the runtime to run this application."
In some cases, I use Windows XP (via Windows Virtual PC in 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
He mentioned: "If your application configuration file is called application-name.config, rename it to application-name.exe.config. For example, rename MyApp.config to MyApp.exe.config.".
I tried this, thinking that this might solve the problem, but I still get "Unable to find runtime version to run this application." when I try to run .NET 3.5 (client profile or full) application on WinXP with .NET 4.0.
Dan W Mar 31 '12 at 21:15 2012-03-31 21:15
source share