C# MSBuild如何查找ASP.NET项目的bindingRedirect属性?

C# MSBuild如何查找ASP.NET项目的bindingRedirect属性?,c#,asp.net,.net,msbuild,C#,Asp.net,.net,Msbuild,我有两台机器,一台运行Win10,另一台运行Windows Server 2012 R2。两者都安装了Microsoft Build Tools 2015。当我在Win10计算机上运行msbuild my.csproj时,我得到0个警告,但在Windows服务器上,我得到了完全相同项目的MSB3247: [ResolveAssemblyReference] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersio

我有两台机器,一台运行Win10,另一台运行Windows Server 2012 R2。两者都安装了Microsoft Build Tools 2015。当我在Win10计算机上运行msbuild my.csproj时,我得到0个警告,但在Windows服务器上,我得到了完全相同项目的MSB3247:

[ResolveAssemblyReference] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819, 5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="protobuf-net" culture="neutral" publicKeyToken="257b51d87d2e4d67" /><bindingRedirect oldVersion="0.0.0.0-2.0.0.668" newVersion="2.0.0.668" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="RazorEngine" culture="neutral" publicKeyToken="9ee697374c7e744a" /><bindingRedirect oldVersion="0.0.0.0-3.7.4.0" newVersion="3.7.4.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /></dependentAssembly></assemblyBinding>
[ResolveAssemblyReference]C:\Program Files(x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5):警告MSB3247:发现同一依赖程序集的不同版本之间存在冲突。在Visual Studio中,双击此警告(或选择它并按Enter键)以修复冲突;否则,将以下绑定重定向添加到应用程序配置文件中的“运行时”节点:

文件Web.config包含绑定重定向,在Win10上MSBuild似乎应用了这些重定向,而在Windows Server上,此配置文件及其所有绑定重定向内容似乎被忽略。因此,我的问题是:MSBuild在哪里查找不同类型项目的绑定重定向配置,以及如何控制此过程?

您所说的“似乎忽略了东西”是什么意思?你看到的是什么样的错误?我是说像这样的错误。我在问题中添加了警告文字。该文本建议将bindingRedirects添加到我的Web.config文件中,但所有重定向都已存在。可能存在重复的