[英]Compiler error after moving C# project from VS 2005 to VS 2013
I faced a problem after converting a C# project from VS 2005 to VS 2013: 将C#项目从VS 2005转换为VS 2013后,我遇到了一个问题:
C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3268: The primary reference [assembly reference] could not be resolved because it has an indirect dependency on the framework assembly "System.Core" which could not be resolved in the currently targeted framework.
C:\\ Program Files(x86)\\ MSBuild \\ 12.0 \\ bin \\ Microsoft.Common.CurrentVersion.targets(1635,5):警告MSB3268:无法解析主引用[程序集引用],因为它间接依赖于框架程序集“ System.Core”,当前目标框架中无法解决。 ".NETFramework,Version=v2.0".
” .NETFramework,版本= V2.0" 。 To resolve this problem, either remove the reference [assembly] or retarget your application to a framework version which contains [assembly]
要解决此问题,请删除引用[assembly]或将应用程序重新定位到包含[assembly]的框架版本
This question has the same issue but the solution does not work for me (use of <SpecificVersion>true</SpecificVersion>
) 这个问题有相同的问题,但是解决方案对我不起作用(使用
<SpecificVersion>true</SpecificVersion>
)
Result: The project does not compile any more (was no problem under VS 2005) 结果:项目不再编译(在VS 2005下没有问题)
I don't know how to go on with this, so any hint is welcome... 我不知道如何进行此操作,因此欢迎任何提示...
EDIT 编辑
I want to stay with framework 2.0. 我想继续使用Framework 2.0。
EDIT #2 编辑#2
The project references a third-party assembly that targets also 2.0 该项目引用了一个针对2.0的第三方程序集
With a similar issue (same warning message, different assembly), I found a 对于类似的问题(相同的警告消息,不同的程序集),我发现了一个
<bindingRedirect ... />
in the web.config that was associated with the assembly that couldn't be resolved. 在与无法解析的程序集关联的web.config中。 Removing the bindingRedirect fixed my problem.
删除bindingRedirect解决了我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.