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