【问题标题】:Project referencing wrong version of DLL项目引用错误版本的 DLL
【发布时间】:2019-08-02 17:00:18
【问题描述】:

我的项目引用了 Microsoft.Xrm.Sdk.dll 并且我包含了 9.0.0.0 版本,但是在运行应用程序时出现以下错误:

在单步执行代码并询问实际使用的文件版本时:

在 VS 中查看文件属性时:

我曾尝试在我的系统上查找 dll 的其他副本并删除它们,但这并没有帮助。我还在 app.config 中尝试了 bindingRedirect:

  <dependentAssembly>
      <assemblyIdentity name="Microsoft.Xrm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />
      <bindingRedirect oldVersion="5.0.0.0" newVersion="9.0.0.0" />
      <codeBase version="9.0.0.0" href="file:///C:/DLLS/Microsoft.Xrm.Sdk.dll" />
  </dependentAssembly>

在构建时的输出窗口中:

似乎大多数人在使用 bindingRedirect 时可以让事情正常工作,即使只是作为测试。我还能做什么?

【问题讨论】:

    标签: c# .net visual-studio dll app-config


    【解决方案1】:

    尝试从您的引用中删除引用“Microsoft.Xrm.Sdk.dll”并安装 nuget Microsoft.CrmSdk.Workflow

    【讨论】:

    • 将项目更新到更高版本的 .net 框架,然后安装最新版本的 CRM SDK 似乎可以解决我的问题。
    猜你喜欢
    • 2014-06-16
    • 1970-01-01
    • 2017-11-09
    • 2016-06-01
    • 2010-09-07
    • 1970-01-01
    • 1970-01-01
    • 2012-07-14
    • 1970-01-01
    相关资源
    最近更新 更多