Should I really use the GAC?

  • Thread starter Thread starter Peter Morris [Droopy eyes software]
  • Start date Start date
P

Peter Morris [Droopy eyes software]

The facts are

1) I have a number of DLLs which could easily be reused by other apps my
company develops.
2) I am not likely to develop more than 1 app for the same PPC, but there is
a small chance of it happening.
3) If #2 does happen then the version number of the shared DLLs is likely to
have changed (only the minor number though).


The questions are
1) Is it worth using the GAC? I suspect not
2) If I did use the GAC and then deployed a newer minor version of a DLL
would it add an additional file to the device or replace the existing one?


Thanks

Pete
 
1) Is it worth using the GAC? I suspect not

Yes. There's really no down side to using the GAC - it's not goiong to take
up more space or anything, and if you need the libraries in some other app
later on they're there.
2) If I did use the GAC and then deployed a newer minor version of a DLL
would it add an additional file to the device or replace the existing one?

Your choice. Replacement is probably the simplest way to go. Just like the
various releases of CF 1.0.
 
Hi
Your choice. Replacement is probably the simplest way to go. Just like
the various releases of CF 1.0.

But the filename includes culture and version number. So will the installer
remove the other version of a new minor version is installed?
 
No, assemblies with different major and minor versions will operate
side-by-side with previous versions - the installer won't remove old
versions (it would break your other app if it did).

Peter
 
No, assemblies with different major and minor versions will operate
side-by-side with previous versions - the installer won't remove old
versions

That's what I thought, so in my situation (frequently changing minor
versions) it would actually use much more space.

(it would break your other app if it did).

Really? I always thought that dotnet would use the latest version of the
DLL as long as the major version matched?
 
Your filename actually includes the culture and version number?! I would
never consider such a thing...that's what the version info is for!

Tim
 
For a GAC file, yes, it includes all of that info. Take a look at the CF
stuff. You have to have different names to support side-by-side installs of
different versions of the same assembly anyway, so different names is
required.

-Chris
 
No, you can change only the Revision part of the version (Or possibly the
Build and Revision I can't 100% recall). Certainly the major and minor
versions identify a separate version of the dll, and if you don't have the
correct one present you'll get a typeloadexception.

Peter
 
So if A.B.C.D is my version number then it is okay for me to change C.D?

Thanks for the info!

Pete
 
Back
Top