Unique assembly (dll/ocx)

  • Thread starter Thread starter Cesar Ronchese
  • Start date Start date
C

Cesar Ronchese

Hi.

I've been developed a dll em VB .net and set it to GAC.

Then, I build an executable to make use from that dll. It works fine.

Now, I did modifications in that dll, and rebuild her.

When I call the executable again, I noted that the executable is not using
the new version of my dll.

My doubt is follow: can I do my all dlls/ocxs be unique to all my
applications? I need work like COM, where I do bug fixes and release to my
clients just one copy of modified file, and then all applications take
advantages from that corrections.

Tx for advances!

Cesar
 
Unless you keep the version of the DLL the same in between change, all
applications that want to use it will have to be recompiled.
 
Its so bad. Then, I cannot keep version control between my releases?


"Marina" <[email protected]> escreveu na mensagem
Unless you keep the version of the DLL the same in between change, all
applications that want to use it will have to be recompiled.
 
Hi Cesar,

You have a few options to do that:

1) Use the same version in the assembly info and when you recompile the DLL,
after each compilation put it in the GAC. That way when you will run the
executable afterwards it will take the new DLL. You can do that by using the
gacutil.exe which is in the SDK directoroy (Program Files\Microsoft Visual
Studio 2003\SDK\v1.1.\bin). Use the following syntax:

gacutil /i mydll.dll /f which will override the existing version of the
DLLs.

Of course this is only got for development times.

2) The second options which is mostly for production is to use policy files,
so when you compile a newer version of the DLL which will probably have a
different version you will need to put the new DLL and the policy file in
the GAC. When the executable will ask for the older version of the DLL, it
will automatically see that there is a policy file and it will be redirected
to the new version.

You can find more information on policy files here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconcreatingpublisherpolicyfile.asp
 
cool, i used the policies, and it works.

Tx!

"Eran Sandler" <esandler at XXXnetvisionXXX.net.il> wrote in message
Hi Cesar,

You have a few options to do that:

1) Use the same version in the assembly info and when you recompile the DLL,
after each compilation put it in the GAC. That way when you will run the
executable afterwards it will take the new DLL. You can do that by using the
gacutil.exe which is in the SDK directoroy (Program Files\Microsoft Visual
Studio 2003\SDK\v1.1.\bin). Use the following syntax:

gacutil /i mydll.dll /f which will override the existing version of the
DLLs.

Of course this is only got for development times.

2) The second options which is mostly for production is to use policy files,
so when you compile a newer version of the DLL which will probably have a
different version you will need to put the new DLL and the policy file in
the GAC. When the executable will ask for the older version of the DLL, it
will automatically see that there is a policy file and it will be redirected
to the new version.

You can find more information on policy files here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconcreatingpublisherpolicyfile.asp
 
Back
Top