4
votes

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

Is there a way to deploy the new dll and ask all the applications to pick the latest version without having to recompile the applications. I am aware of assembly redirection using Publisher Policy. Is there another way?

2

2 Answers

2
votes

A publisher policy is explicitly designed to do this, not considering it to solve your problem doesn't make a lot of sense. Given that your update is 'backward compatible', a no-hassle approach would be to simply not change the [AssemblyVersion] but only increment the [AssemblyFileVersion].

2
votes

You can add a new AssemblyBinding element in 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>