将 dll 替换为较新版本 [英] Replacing dll to a newer version

查看:45
本文介绍了将 dll 替换为较新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含许多项目的 Caliburn.Micro 应用程序.多个项目在单独的文件夹中引用同一个 dll.现在我需要用更新的版本替换那个 dll.我从所有项目中删除了引用并再次添加了它.但我收到一个运行时错误:

I have a Caliburn.Micro application with many projects. Several projects refer to the same dll in a separate folder. Now I needed to replace that dll with a newer version. I removed the reference from all projects and added it again. But I am getting a runtime error:

你能帮忙吗?

附言我尝试使用 fuslogvw.exe,但它显示为空:

P.S. I tried to use fuslogvw.exe, but it shows up empty:

推荐答案

我认为您正在使用 Visual Studio.首先,如果特定版本设置为 False,请检查所有 FileHelpers 引用的属性(如果没有,请执行此操作).尝试清理并重建.

I think you're using Visual Studio. First of all, check in the properties of all that FileHelpers referenced if the Specific Version is set to False (if not, do it). Try to clean and build back.

如果问题仍然存在,请在您的解决方案的 app.config 中,在 configuration 部分中,添加

If the problem persist, in the app.config of your solution, in the configuration section, add

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="FileHelper" publicKeyToken="3e0c08d59cc3d657" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
        </dependentAssembly>
    </assemblyBinding>
</runtime>

通过这种方式,您应该能够将使用过的版本强制转换为新版本.

In this way you should be able to force the used version to the new one.

这篇关于将 dll 替换为较新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆