A WinForm .NET program I wrote some time ago. Because it references a lot of library files, but these library files have recently been corrected for some bugs and algorithms. But the main program file has not been changed much. So it's not like recompiling the main program. So all the new version of DLL files were copied to the running directory, hoping that the main program could directly call the new version of the library file. It turned out that these library files were signed with Strong Name. An error occurs as soon as the main program is called, saying that the file of this version cannot be found.
Later, I checked MSDN and found that just adding the runtime node to the config is enough.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyAssembly"
publicKeyToken="2b7c3a3291de04"
culture="neutral" />
<bindingRedirect oldVersion="3.0.0.8"
newVersion="4.1.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
However, the prerequisite for this is that the PublicKeyToken of the two DLLs are the same, which means they need to be signed with the same sn file.
Of course, if your library file is not signed with Strong Name at all, there is no need to consider version issues.