.NET Core中的程序集绑定重定向

问题描述

如何在.NET Core中进行程序集绑定重定向?

我发现这个问题问了好几次,却没有提供解决方案。情况微不足道。我有一个程序包,它引用版本10中的程序集A。我想使用版本12中的程序集A。在标准.NET中,它与此完美配合:

<dependentAssembly>
  <assemblyIdentity name="Microsoft.AnalysisServices.AdomdClient" publicKeyToken="89845dcd8080cc91" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-15.1.52.23" newVersion="12.0.0.0" />
</dependentAssembly>

解决方法

在Rena的帮助下,添加了true 对项目文件的帮助。使用正确的绑定重定向自动生成了.config文件。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...