首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在安装了4.0.3的服务器上部署MVC 4.5.1时出现Targetframework错误

在安装了4.0.3的服务器上部署MVC 4.5.1时出现Targetframework错误
EN

Stack Overflow用户
提问于 2014-08-25 23:16:16
回答 1查看 19.3K关注 0票数 0

我的windows server2008 R2目前已经安装了.NET框架v4.0.3x。

我有一个ASP.NET MVC4.5.1应用程序,当我部署时,我得到以下错误:

代码语言:javascript
复制
The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.

Source Error: 


Line 37:   </appSettings>
Line 38:   <system.web>
Line 39:     <compilation debug="true" targetFramework="4.5.1" />
Line 40:     <httpRuntime targetFramework="4.5.1" />
Line 41:     <pages> 

我是否需要在服务器上安装一些东西,或者是我没有在/bin文件夹中部署正确的dll的问题?

我安装了IIS 7.5.7x。

EN

回答 1

Stack Overflow用户

发布于 2014-08-25 23:18:39

您需要在服务器上安装当前的.Net框架。在此之后,它应该可以工作,因为IIS在4.0和4.5之间没有区别。此外,您需要在IIS管理中选择正确的目标框架。

This就是这样做的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25489104

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档