Clarifying question about the GAC

U

UJ

I've got a program that runs on a machine that will automatically update
things like the DLLs that a group of programs use. I'm looking at using the
GAC because it's getting to the point that I have about 12-15 DLLs that all
the programs use. This all has to be silently in the background from the
user. I understand I can use the command line program to install the DLLs
into the GAC. But what happens to old versions of the assembly? Are they
still there? I assume this means that I need to make sure that all the
correct assemblies have been installed before the programs attempt to access
them. What happens to the old versions? Are they still out there?

So in theory what I would need to do it:

Install the new assemblies I need.
Then install new versions of the programs that use the assemblies.


This could end up with many assemblies with the same signature but different
versions. Is there a way to check on the old versions and get rid of them? I
notice that the uninstall just takes the assembly name. How does it know
which one to uninstall or does it uninstall them all?

If you are uninstalling the assembly while a program is using it what
happens? And if you are starting the program and the assembly has been
removed what happens?

TIA - Jeff.
 
M

Mattias Sjögren

But what happens to old versions of the assembly? Are they
still there?
Yes


Install the new assemblies I need.
Then install new versions of the programs that use the assemblies.

If the new versions are compatible with the old, you can use publisher
policy to make the applications use the new versions without having to
update the apps.

I notice that the uninstall just takes the assembly name. How does it know
which one to uninstall or does it uninstall them all?

A full assembly name includes the version number.

If you are uninstalling the assembly while a program is using it what
happens?

I don't know but it should be easy enough to test.

And if you are starting the program and the assembly has been
removed what happens?

If no configuration has been made to enable another version to be
used, the program will fail when it tries to load the assembly.


Mattias
 

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

Top