【问题标题】:Specify bindingRedirect for .net dll为 .net dll 指定 bindingRedirect
【发布时间】:2014-05-16 15:59:42
【问题描述】:

我有一个使用 log4mongo 的 .net dll。在普通的 .exe 中,为了让 mongo 找到适用的 log4net .dll,它目前需要在其 .config 文件中指定一个 bindingRedirect:

   <dependentAssembly>
     <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-1.2.13.0" newVersion="1.2.13.0" />
   </dependentAssembly>

不幸的是,我没有 .config 文件来指定它。常见的答案是把它放在执行程序的初始 .exe.config 中,但是这个 .net dll 是通过 node.js 通过 edge 运行的。 js。有没有办法可以在运行时或通过其他一些预构建设置指定 dll 绑定重定向?

【问题讨论】:

    标签: c# dll log4net edge.js


    【解决方案1】:

    你看到this post了吗?

    我相信(虽然没有尝试过)您可以通过创建(如果不存在)或修改 node.exe.config 文件来将配置应用于节点进程。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-23
      • 2018-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-16
      • 2014-06-25
      • 1970-01-01
      相关资源
      最近更新 更多