现在的位置: 首页 > 综合 > 正文

Net Framework Initialization Error – Unable to find a version of the runtime to run this applicatio .Net Framework Initialization Error – Unable to find a version of the runtime to run this applicatio

2013年09月20日 ⁄ 综合 ⁄ 共 1042字 ⁄ 字号 评论关闭

 

.Net Framework Initialization Error – Unable to find a version of the runtime to run this applicatio

分类: 其它 1880人阅读 评论(1) 收藏 举报

部署一个VS2010开发的程序时遇到 了一个非常奇怪的问题,客户端上已经安装了.net framework 4.0,但运行时还是会弹出错误:

.Net Framework Initialization Error – Unable to find a version of the runtime to run this application

查了一下,有人提供了这样的解决方法,试了一下,成功:

修改Exe的Config文件,一般是与exe同名,例如test.exe对应test.exe.config,在其中的<configuration>标签内添加如下内容:

<startup>
  <supportedRuntime version="v4.0.30319" />
</startup>

当然,具体的版本号根据实际情况而修改

如果文件夹下没有Config文件,自己创建一个也有效果,内容如下:

<configuration>
  <startup>
    <supportedRuntime version="v4.0.30319" />
  </startup>
</configuration>

部署一个VS2010开发的程序时遇到 了一个非常奇怪的问题,客户端上已经安装了.net framework 4.0,但运行时还是会弹出错误:

.Net Framework Initialization Error – Unable to find a version of the runtime to run this application

查了一下,有人提供了这样的解决方法,试了一下,成功:

修改Exe的Config文件,一般是与exe同名,例如test.exe对应test.exe.config,在其中的<configuration>标签内添加如下内容:

<startup>
  <supportedRuntime version="v4.0.30319" />
</startup>

当然,具体的版本号根据实际情况而修改

如果文件夹下没有Config文件,自己创建一个也有效果,内容如下:

<configuration>
  <startup>
    <supportedRuntime version="v4.0.30319" />
  </startup>
</configuration>

抱歉!评论已关闭.