我的windows server2008 R2目前已经安装了.NET框架v4.0.3x。
我有一个ASP.NET MVC4.5.1应用程序,当我部署时,我得到以下错误:
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。
发布于 2014-08-25 23:18:39
您需要在服务器上安装当前的.Net框架。在此之后,它应该可以工作,因为IIS在4.0和4.5之间没有区别。此外,您需要在IIS管理中选择正确的目标框架。
This就是这样做的。
https://stackoverflow.com/questions/25489104
复制相似问题