Always collect the latest dll from the GAC

We have a dll with version 1.0.1. *, which is used by many applications that run on different machines themselves. This DLL is located in the GAC of the machine on which the application is running. The application includes this DLL as a link with the "Specific Version" set to false. We came up with version 1.0.2. * This DLL, which is backward compatible.

Is there a way to deploy a new dll and ask all applications to select the latest version without having to recompile the applications. I know assembly redirection using publisher policy. Is there another way?

+4
source share
2 answers

The publisher’s policy is clearly intended to do this, not counting it to solve your problem, it doesn’t make much sense. Given that your update is “backward compatible”, the approach without problems would be to simply not modify [AssemblyVersion], but only increase [AssemblyFileVersion].

+2
source

You can add a new AssemblyBinding element to your web.config:

<dependentAssembly> <assemblyIdentity name="NHibernate" publicKeyToken="AA95F207798DFDB4" culture="neutral" /> <bindingRedirect oldVersion="1.0.0.0-2.1.1.4000" newVersion="2.1.2.4000" /> </dependentAssembly> 
+2
source

Source: https://habr.com/ru/post/1342013/


All Articles