Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
935 views
in Technique[技术] by (71.8m points)

c# - Replacing dll to a newer version

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:

enter image description here

Could you please help?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...