views:

171

answers:

2

We have a vendor who is writing an application for us who makes use of a dll I've provided to them. My boss just found out that if we ever need to make a change to one of our dll's we'd have to provide the updated version to the vendor so they could recompile their project. This causes problems because we don't have automated testing and any new build would require a complete run-through by our QA department.

I've not done too much with the GAC before but believe it could be what we're looking for. Is there a way I could deploy my dll (the one I provide to the vendor) to the GAC and have the vendor build their .net project in such a way as to always grab the latest version from the GAC?

+2  A: 

They will need to set the SpecificVersion property of the reference to false in the project that they're compiling. See this question and the article that it links to.

Adam Robinson
A: 

If you have made a breaking change in your DLL, you will of course need to ship the new version so your vendor can compile with it.

But otherwise there is no need for the vendor to have the latest version. Instead you can use Assembly Binding Redirection to ensure you are using the most appropriate (usually latest) version at runtime.

There are several ways to achieve this as described in the linked article - the most common is to use settings in the application configuration file (if you only want to affect this application) or a publisher policy file (if you want to affect all applications that use the shared assembly).

Joe
By default, any strong-signed assembly (which you have to do to put it into the GAC) is bound to a specific version, breaking this suggestion. The vendor will have to set the `SpecificVersion` option to `false`, as I suggested in my answer.
Adam Robinson
"...breaking this suggestion" - no, the SpecificVersion option affects Visual Studio. At runtime, assembly binding can be overridden despite the fact a specific version was specified when building.
Joe