【问题标题】:Targeting a higher framework than project’s current target framework针对比项目当前目标框架更高的框架
【发布时间】:2013-09-28 22:24:42
【问题描述】:

我收到了这些构建警告。

The referenced project 'X' is targeting a higher framework version (4.5) than this project’s current target framework version (4.0). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain.

The primary reference "C:\X\X.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

This may lead to build failures.

有谁知道是哪一种失败

【问题讨论】:

    标签: .net .net-4.0 .net-4.5


    【解决方案1】:

    如果您引用的程序集使用了在 .NET 4.5 中添加但在 4.0 中不存在的任何内容,它可能会失败。您可以检查更改和添加的列表,例如这里:Differences between .NET 4.0 and .NET 4.5 in High level in .NET

    【讨论】: