rebuilding assemblies installed in GAC

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
 
M

Mattias Sjögren

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
 
M

Manoj G [MVP]

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.*")]
 
G

Guest

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.
 

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