简体   繁体   English

将C#项目从VS 2005移至VS 2013后的编译器错误

[英]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.

相关问题 将项目移至VS2013后无法添加控制器 - Unable to add controller after moving project to VS2013 从未管理的项目(C / C ++ VS2005)调用托管代码(C#/ Visual Basic VS2010) - Calling managed code (C#/Visual Basic VS2010) from an unmanagened project (C/C++ VS2005) 从VS2010升级到VS2013(或VS2012)后,无法打开Visual Studio C#解决方案,错误消息“不支持给定路径的格式” - Can not open Visual Studio C# solution after upgrading from VS2010 to VS2013 (or VS2012), error message “The given path's format is not supported” VS2005中的C#:在项目的“参考”文件夹中列出的程序集 - C# in VS2005: Assemblies listed in the “References” folder in a project 什么.net版本VS2005用于C#项目 - what .net version VS2005 use for C# project VS2015中的VS2013 C#项目:它们将使用Roslyn编译器吗? - VS2013 C# projects in VS2015: Will they use the Roslyn compiler? VS2013中的安装项目没有C ++ 2005 Redistrbutable - Setup project in VS2013 does not have C++ 2005 redistrbutable 打开ExcelConnection C#VS2005时出错 - Error in opening ExcelConnection C# VS2005 将C#项目从VS 2010升级到2013; 需要使其适用于Windows 8和10 - Upgrading C# project from VS 2010 to 2013; need to make it work for Windows 8 and 10 被只能在VS2013上运行的LightSwitch项目占用时,使用C#7.0调试dll并从VS 2017构建 - Debug a dll using C# 7.0 and build from VS 2017 when consumed by a LightSwitch project that can only run on VS2013
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM