最近的Visual 2012更新似乎破坏了我的构建中的某些内容。我认为这与上周的nuget更新有关。
NuGet package restore started.
All packages are already installed and there is nothing to restore.
NuGet package restore finished.
1>------ Rebuild All started: Project: Project1, Configuration: Debug Any CPU ------
1> Consider app.config remapping of assembly "Microsoft.Data.OData, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.0.0" [] to Version "5.6.0.0" [C:\Users\avianbc\Desktop\Project1\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll] to solve conflict and get rid of warning.
1> Consider app.config remapping of assembly "Microsoft.Data.Edm, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.0.0" [] to Version "5.6.0.0" [C:\Users\avianbc\Desktop\Project1\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll] to solve conflict and get rid of warning.
1> Consider app.config remapping of assembly "System.Spatial, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.0.0" [] to Version "5.6.0.0" [C:\Users\avianbc\Desktop\Project1\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll] to solve conflict and get rid of warning.
1>c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.
1> Project1 -> C:\Users\avianbc\Desktop\Project1\Project1\bin\Project1.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========我如何解决这些警告?我的应用程序出现了一些奇怪的副作用,比如:不一致的模型绑定(与Edm程序集相关?)。
发布于 2013-09-04 01:40:03
我不知道你为什么认为这很神秘,这很清楚。您已经安装了多个版本的这些包(5.2和5.6) --一些组件引用了5.2和5.6,这导致了警告。这意味着您的别名为5.2到5.6,因此引用5.2的程序集将使用5.6。
不过,这可能不是最好的方法,除非您无法控制这些程序集。您可能应该卸载5.2包,然后将nuget引用更新到5.6版本并重新构建。
发布于 2013-09-05 18:04:02
如消息所示,您可以通过将程序集版本5.2映射到版本5.6来修复这些警告。您可以通过编辑配置文件的assemblyBinding来做到这一点。在本例中,添加以下XML:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.6.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.6.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.6.0.0" />
</dependentAssembly>https://stackoverflow.com/questions/18601423
复制相似问题