Unique assembly (dll/ocx)

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
 
M

Marina

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.
 
C

Cesar Ronchese

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.
 
E

Eran Sandler

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
 
C

Cesar Ronchese

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
 

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