rebuilding assemblies installed in GAC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

if i make changes to a project (the dll for which is installed in gac) and
rebuild it in visual studio, does it automatically update the assembly in gac
as well? or do i need to uninstall the assembly and reinstall it? is there a
change that i would need to make in the assembly's property to allow the
version in gac to be updated with each build?

thanks
 
if i make changes to a project (the dll for which is installed in gac) and
rebuild it in visual studio, does it automatically update the assembly in gac
as well?
No

or do i need to uninstall the assembly and reinstall it?

Yes. Why do you put it in the GAC to begin with? Perhaps you should
wait with that until the assembly is more stable and doesn't have to
be rebuilt that often.



Mattias
 
The GAC internally stores a copy of the assembly you register. Everytime you
make changes to the original assembly you have to re-register it in GAC for
changes to be effected. VS.NET does not check or bother to update the
assembly in the GAC every time you build. You could however create a Post
build event (When build updates Project output option) to run a batch file
which does a gacutil /if <your assembly>. (Note: VB.NET projects dont have
Post build Events in VS.NET 2003)

And to change build numbers automatically, you can rely on VS.NET. Just use
a * wildcard in your AssemblyVersion attribute. For e.g
[assembly: AssemblyVersion("1.0.*")]
 
or do i need to uninstall the assembly and reinstall it?
Yes. Why do you put it in the GAC to begin with? Perhaps you should
wait with that until the assembly is more stable and doesn't have to
be rebuilt that often.

the assembly installation in gac is a requirement for biztalk...need to do
that anytime i add a class library to my solution.
 
Back
Top