简体   繁体   English

从VS2010迁移到VS2013后生成警告

[英]Build warnings after migrating from VS2010 to VS2013

I am in the process of moving my development environment to a new machine. 我正在将开发环境迁移到新机器上。 I decided to install VS2013 Pro on my new machine (VS2010 Pro on the old machine). 我决定在新计算机上安装VS2013 Pro(在旧计算机上安装VS2010 Pro)。 I copied the entire Visual Studio 2010 folder over to the Projects folder on the new machine. 我将整个Visual Studio 2010文件夹复制到新计算机上的Projects文件夹中。 I opened my solution in VS2013 and everything migrated without error. 我在VS2013中打开了我的解决方案,所有内容都迁移无误。 I rebuilt the solution and got the following warnings. 我重建了解决方案,并收到以下警告。 I have compared my projects side by side on old and new machine and can't find any differences. 我在新旧机器上并排比较了我的项目,没有发现任何差异。 The only difference I have been able to find is that the old machine has folders for only .NET 4.0 and the new machine has .NET 4.0, 4.5 and 4.5.1. 我能够找到的唯一区别是,旧计算机仅具有.NET 4.0文件夹,而新计算机具有.NET 4.0、4.5和4.5.1。

Warnings: (0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. 警告:(0,0):警告:以下程序集与.NET Framework版本具有更高的依赖关系,该版本高于目标版本,并且在运行时可能会因失败而无法正确加载:Email,Version = 1.0.0.0,Culture =中性,PublicKeyToken =空。 The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. 依赖关系为:Microsoft.VisualBasic,版本= 10.0.0.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a。 You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly. 您应该确保从属程序集对于目标框架是正确的,或者确保要处理的目标框架是从属程序集的目标框架。

(0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: SharedLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. (0,0):警告:以下程序集具有高于.NET Framework版本的依赖关系,该版本高于目标版本,并且在运行时可能无法正确加载,从而导致失败:SharedLibrary,Version = 1.0.0.0,Culture = neutral, PublicKeyToken =空。 The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. 依赖关系为:Microsoft.VisualBasic,版本= 10.0.0.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a。 You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly. 您应该确保从属程序集对于目标框架是正确的,或者确保要处理的目标框架是从属程序集的目标框架。

(0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: VendorsLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. (0,0):警告:以下程序集具有高于.NET Framework版本的依赖关系,该版本高于目标版本,并且在运行时可能无法正确加载,从而导致失败:VendorsLibrary,Version = 1.0.0.0,Culture = neutral, PublicKeyToken =空。 The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. 依赖关系为:Microsoft.VisualBasic,版本= 10.0.0.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a。 You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly. 您应该确保从属程序集对于目标框架是正确的,或者确保要处理的目标框架是从属程序集的目标框架。

I think I figured it out based on this post. 我想我根据这篇文章弄清楚了。 Adding a line in the compilation section of web.config for Microsoft.VisualBasic prevents the build warnings. 在web.config的Microsoft.VisualBasic的编译部分中添加一行可防止生成警告。

<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" batch="false">
  <assemblies>
    .
    .
    .
    <add assembly="Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </assemblies>
</compilation>

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

相关问题 无法构建-将VC ++代码从VS2010迁移到VS2013 - Unable to build - Migrating VC++ code from VS2010 to VS2013 从VS2010迁移到VS2013后的代码覆盖问题 - Code coverage issues after migrating from VS2010 to VS2013 将VS2013和VS2010与TFS2010一起使用 - Using VS2013 and VS2010 with TFS2010 将VS2010 CodeGenerator扩展移植到VS2013 - Port VS2010 CodeGenerator extension to VS2013 从VS2010升级的VS2013 winforms项目中缺少一些图标和文本 - some icons and text missing from VS2013 winforms project upgraded from VS2010 LINQ设计时间错误从VS2010升级到VS2013 - LINQ Design Time Errors Upgrading From VS2010 to VS2013 从C#调试C ++ dll在VS2013中有效,但在VS2010中无效 - Debug C++ dll from C# works in VS2013, but not VS2010 C#-SQL Server数据工具-如何从VS2010迁移到VS2013 - C# - SQL Server Data Tools - How to migrate from VS2010 to VS2013 从VS2010升级到VS2013失去了视觉风格 - Upgrading from VS2010 to VS2013 has lost the visual styles 从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”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM