【发布时间】: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