versioning for sub-assemblies

versioning for sub-assemblies

am 31.01.2008 21:46:00 von WayneM

We are trying to figure out a solution and trying to find a good source of
information.

We have an enterprise product that loads many different .net assemblies -
all follow a specific interface but do various tasks.
We have common .net libraries, that each of those task-assemblies use, and
we wanted a way to allow/specify each task-assembly to use (if required) a
particular version of the common libraries.

So Enterprise.EXE can launch
Function1.DLL
and/or Function2.DLL
and/or Function3.DLL

and ideally the common libraries CommonA.DLL, CommonB.DLL, CommonC.DLL
could be versioned separately for each functional assembly. These are NOT
satellite assemblies for localization - we just want to ensure version safety
for common DLLs.
In case we wanted to install a new Function2.DLL and the Common?.DLL
but not have the new Common?.DLL be used by the other Function?.DLL

Currently the approach is copying/renaming the common projects, so Function1
used F1CommonA, F1CommonB, & F1CommonC.
But of course that isn't the ideal solution.

I assume using the GAC should solve it, but I have not found an (easy to
understand) GAC reference. But even if we took that path I assume we'll be
need to configure what uses what.
I have looked at the app.config files and using redirection rules - but it
seems to be based on "the application" and I need to specify rules for
assemblies and "sub-assemblies".

I thought maybe renaming the common projects and having the Functional
projects refer to the renamed assembly - but something in the build process
was complaining that it could not find the assembly (I think the error was
MSB3217).

I also wondered if an assembly can dynamically load another assembly in code
and whether that would resolve the issues?

The other task I tried was using ILMerge to combine the parent & common
assemblies - but I don't think that is the best approach anyway.

So we've thought of different ideas, and seen a number of webpages talking
about various ideas (including disassembling and reassembling...) but I
didn't see a good example that is geared about assemblies and it's
dependencies.

Any suggestions?