Deploy a vs2010 developedProgramA very strange problem occurs. the. NET Framework 4.0 has been installed on the client, but an error still pops up during running:
. NET Framework initialization error-unable to find a version of the runtime to run this application
I checked it and someone provided the solution. I tried it and succeeded:
Modify the configfile of exe, which is generally the same name as exe. for example, test.execorresponds to test.exe. config, and add the following content in the <configuration> tab:
<Startup> <supportedruntime version = "v4.0.30319"/> </startup>
Of course, the specific version number is modified based on the actual situation.
If there is no config file in the folder, creating one by yourself will also work as follows:
<Configuration> <startup> <supportedruntime version = "v4.0.30319"/> </startup></Configuration>