Updating GAC-based Assemblies: How to handle versioning?



I've built a core set of assemblies that are shared by multiple ASP.NET web
applications on a production server. These assemblies are updated quite
frequently, as I am continually adding to and improving the core
functionality of my applications.

Up until now, I've used a batch script to copy updated assembly versions to
the \bin directory for each application. However, given that all
applications always use the latest version of the assemblies, the GAC is a
perfect place to locate them rather than an identical copy of each assembly
in every applications \bin.

My problem is how to handle the versioning so that updating the assemblies
(which could happen as often as daily) is a simple operation. Ideally, I
would copy the assemblies to the production server and run a batch file to
install them in the GAC.

My questions become:

If I don't change the version numbers each time (i.e. the version number is
always, will the applications pick up the new version automatically?
Right now, that doesn't appear to be the case.

If I do change the version number, then I have to change the root web.config
file every time, maintain a publisher policy, or update the binding policy
every time, none of which I want to do.

What is the best solution here?



Cowboy \(Gregory A. Beamer\)

You ahve to set up a policy for GAC objects. Even if you are compiling same
culture and same version, the assembly stored will have a different
signature and not automagically be updated. Through policies, like a
publisher policy, you can force an update to the newest version.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question