【发布时间】:2020-10-27 13:23:42
【问题描述】:
如果我编译我的应用程序,则会在输出中自动添加一个程序集绑定。具体的程序集绑定不在 Visual Studio 中的 app.config 中,而是在创建的应用程序配置中。
有什么方法可以检查为什么会自动添加程序集绑定? AutoGenerateBindingRedirects 选项未启用。
我不想有以下程序集绑定
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.2" newVersion="4.0.2.2" />
</dependentAssembly>
</assemblyBinding>
此外,安装了完全不同的程序集版本。
编辑
当查看编译器 binlog 结果(使用 msbuild /bl 编译)时,会发生这种情况:
这很奇怪,因为我们在4.7.3的目录下有4.0.2.2的版本
非常感谢!
【问题讨论】:
标签: c# .net visual-studio msbuild assembly-binding-redirect