.Net error: Unable to find a version of the runtime

I don't normally blog about Windows errors but while installing a Windows virtual machine for work purposes I came across, a rather notorious I must say, error:

"Unable to find a version of the runtime to run this application"

Ok, first of all I am assuming that you already got the .Net framework installed, probably version 4.xxxx - and that's why you're confused why your application is not working - well this application is probably expecting an older version of the framework (v.2). I don't expect you to remove .Net v4 to install v2 :) But there is a hack!

Inside the same folder of the .exe application, create a config file called <application-name>.exe.config where <application-name> is the same name of the application. Put the following configuration in the file:

  <supportedRuntime version="v4.0.30319" />

Restart the application and it should work.

No comments: