.Net Framework Initializing Error

I got this error yesterday while running FxCop application from Microsoft. I think the problem was because of the .Net framework installed on my machine, I have only .Net 4.0 installed and no other versions of .Net. And I think FxCop was expecting .Net 2.0 in the system.
.Net Framework Initialization Error – Unable to find a version of the runtime to run this application
.Net Framework Initialization Error – Unable to find a version of the runtime to run this application

After few searches I found the resolution for this issue. You can add supportedRuntime tag to the application config (It will be like ApplicationName.exe.config in the same folder where application installed.) file, under startup tag, and set the attribute of the supportedRuntime as the version of the .Net Framework installed in the system.
Open Note Pad And Enter This Code:
<startup>
  <supportedRuntime version="v4.0.30319" />
</startup>
After That Save And Give Name Like The Application Name
ApplicationName.exe.config

Example, I Want To Open Linkbucks Superior From Ubers.org

linkbuckssuperior.exe.config

Edited:
New Code For Fixing This Issues Is Here:
<configuration>
   <startup>
      <supportedRuntime version="your current installed framework"/>
      <supportedRuntime version="your current installed framework"/>
   </startup>
</configuration>
Example: I have Installed .Net Framework 4, So Here Is The Code:
<configuration>
   <startup>
      <supportedRuntime version="v4.0.30319"/>
      <supportedRuntime version="v4.0.30319"/>
   </startup>
</configuration>
Hope You Could Configure It Ur Self Or You Could Ask Me To Make This Cofig By Comment

Tidak ada komentar:

Posting Komentar