How to install a global assembly (Client's PC)

S

Steven Blair

I have installed an assembly into the GAC on my local PC using gacutil.
How can I now install this on my client's PC without getting them to use
this tool.
The dll should be added to the GAC and be copied to a sub directory here
(confirm this is the case):

C:\WINNT\assembly

or should it get installed in another directory, for example:

C:\Program Files\My Product\bin

It is my understanding that after installed to the GAC, the GAC has it's
own copy of the assembly?

I tried using a Setup package, but this merely installed a dll to a
directory like the one above and I am not too sure thats the correct end
result.

Thanks in advance for the help.
 
S

Steven Blair

So simply copying the dll to this folder adds it to the GAC?
After this, the dll would then be available to the client?

When the client wishes to use the dll, they must add a refence. Where
would the dll be located? (WINNT\assembly does not hold the dll's?)

Can this be achieved using an installtion package?
 
M

Michael Nemtsev

Hello Steven,

SB> So simply copying the dll to this folder adds it to the GAC? After
SB> this, the dll would then be available to the client?

Yep, but only via explorer, coz in has the specific extetion knowing how
to install (read as silent gacutil)

SB> When the client wishes to use the dll, they must add a refence.
SB> Where would the dll be located? (WINNT\assembly does not hold the
SB> dll's?)

it will be at GAC.
WINNT\assembly DOES hold them

SB> Can this be achieved using an installtion package?
yep, just use gacutil

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangel
 
S

Steven Blair

Michael,

Thanks for the help. I dragged my dll in and it adds it.
However, where does my client browse to when they want to adda reference
to this dll?
I tried browsing to the assembly folder but there doesn't appear to be
anything there selectable.
Do I have to have a copy of the dll somewhere on the disk that the
client must reference to or can I add a refence via the assembly folder
(if so, how?)

Thanks again.

Steven
 
M

Michael Nemtsev

Hello Steven,

Read this http://support.microsoft.com/?kbid=306149

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


SB> Michael,
SB>
SB> Thanks for the help. I dragged my dll in and it adds it.
SB> However, where does my client browse to when they want to adda
SB> reference
SB> to this dll?
SB> I tried browsing to the assembly folder but there doesn't appear to
SB> be
SB> anything there selectable.
SB> Do I have to have a copy of the dll somewhere on the disk that the
SB> client must reference to or can I add a refence via the assembly
SB> folder
SB> (if so, how?)
SB> Thanks again.
SB>
SB> Steven
SB>
SB>
SB>
 
S

Steven Blair

Michael,

Registry worked, but still one thing I am not sure about.
When I add a reference to my dll, it is still located at the folder I
copied the dll (C:\Program Files\Company Name).
I was under the impression I would not need to copy the dll to a
location on the local PC after I installed to the GAC.

Does this mean if I have 5 GAC dll's that I need to first add them to
the GAC and have them available in a standard folder so the client can
add a reference, and if so, what would happen when I wanted to add a
newer version of one of the dll's to the client (I would drop into GAC,
but would I have to make another folder for this updated dll since the
older dll might still be used!)

Thanks for your continued help.

Steven
 
M

Michael Nemtsev

Hello Steven,

SB> worked, but still one thing I am not sure about.
SB> When I add a reference to my dll, it is still located at the folder
SB> I
SB> copied the dll (C:\Program Files\Company Name).

yep, there is nothing wrong that they will locate there. the only requirement
that you app will reference to the GAC version
BTW, what are the need to keep you dll there?! Put them only to GAC during
install

SB> I was under the impression I would not need to copy the dll to a
SB> location on the local PC after I installed to the GAC.

Yes

SB> Does this mean if I have 5 GAC dll's that I need to first add them
SB> to the GAC

yes

SB> and have them available in a standard folder so the

nada

SB> client can add a reference,

only to GAC versions, if u wanna have your asm in gac

SB> and if so, what would happen when I
SB> wanted to add a newer version of one of the dll's to the client (I
SB> would drop into GAC,

yes

SB> but would I have to make another folder for
SB> this updated dll since the older dll might still be used!)

nope. if u put asms into GAC during install there is no reason to keed your
dlls somewhere else

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangel
 

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