3

我有带有 Visual Studio 2013 的 Windows 8.1。当我构建项目时,它会生成错误指示,

警告 2
主要参考“D:\SageDemo3.5\SageFrame.Common\bin\Debug\SageFrame.Common.dll”
无法解决,因为它是针对“.NETFramework,Version=v4.5.1”构建的
框架。

这是比当前目标框架“.NETFramework,Version=v4.5”更高的版本。

4

2 回答 2

2

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.

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. Because SageFrame.Common is built in 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.
于 2015-02-23T05:51:19.767 回答
0

我假设版本是在您的 web.config 中指定的,例如:

<httpRuntime targetFramework="4.5" />

另一个可能出错的地方是 IIS 应用程序池,例如,如果您的默认应用程序池在 4.0 或更早版本上运行。所以你要做的是运行 Internet 信息服务管理器,用 4.5 创建一个应用程序池,然后将此应用程序池设置为你正在处理的站点。

于 2015-02-19T10:05:42.670 回答