简体   繁体   English

如何更改sageframe的.net框架版本?

[英]How to change .net framework version for sageframe?

I have windows 8.1 with Visual Studio 2013. While I build projects it generates error indicating, 我有Visual Studio 2013的Windows 8.1。当我构建项目时,它会生成错误指示,

Warning 2
The primary reference "D:\SageDemo3.5\SageFrame.Common\bin\Debug\SageFrame.Common.dll" 
could not be resolved because it was built against the ".NETFramework,Version=v4.5.1" 
framework.

This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 这是比当前目标框架“.NETFramework,Version = v4.5”更高的版本。

It seems that you have added a project library and then in that library you have taken the refrence of SageFrame.common in Viusual studio 2013. Then you built it and get that error. 您似乎已经添加了一个项目库,然后在该库中您已经在Viusual studio 2013中SageFrame.common了SageFrame.common的参考。然后您构建它并获得该错误。

If this is the condition then please be sure that the project library you have added has the application target framework 4.5.1 not 4.5. 如果这是条件,那么请确保您添加的项目库具有应用程序目标框架4.5.1而不是4.5。 Because SageFrame.Common is built in 4.5.1 . 因为SageFrame.Common是在4.5.1中构建的。

In your condition to change the target framework: 在你的条件下改变目标框架:

  • Right click on your project library. 右键单击项目库。
  • Select properties (a form will open). 选择属性(表单将打开)。
  • Select the application tab. 选择应用程序选项卡。
  • Select the target framework to 4.5.1. 选择目标框架为4.5.1。

I assume that the version is specified in your web.config, like: 我假设你的web.config中指定了版本,如:

<httpRuntime targetFramework="4.5" />

The other place where it can go wrong is IIS Application Pool, for example if your default Application Pool runs on 4.0 or earlier. 另一个可能出错的地方是IIS应用程序池,例如,如果您的默认应用程序池在4.0或更早版本上运行。 So what you have to do is run Internet Information Services Manager, create an Application Pool with 4.5 and then set this application pool to the site you're working on. 因此,您需要做的是运行Internet Information Services Manager,使用4.5创建应用程序池,然后将此应用程序池设置为您正在处理的站点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM