GAC

T

Tony Johansson

Hi!

Is it only assembly dll library files that can be added to GAC and not
assembly exe file.

//Tony
 
P

Peter Duniho

Willem said:
Did you try?

Of course he did! Tony would _never_ ask a question here about
something so easily tested, without actually trying it himself. He
knows better than _that_.

So, _obviously_ a better question would be not "Did you try?" but rather
"What happened when you tried it?"

;)

Oh, and Tony…what did happen when you tried it? :)
 
T

Tony Johansson

Willem van Rumpt said:
Did you try?

No but I'm sure as I can be that only assembly dll can be put in the GAC.
The purpose of GAC is that every application can share all the assemblies
that is stored in the GAC withount having their own copy of the assembly.

Storing EXE in GAC would be strange and I assume that I'm not even allowed
to do so becuse it would mean nothing..


//Tony
 
A

Andy O'Neill

Tony Johansson said:
Hi!

Is it only assembly dll library files that can be added to GAC and not
assembly exe file.

//Tony
Why would you want to anyhow?
 
W

Willem van Rumpt

Tony said:
No but I'm sure as I can be that only assembly dll can be put in the GAC.

Then you're not as sure as you could've been by simply trying it.
 
P

Peter Duniho

Tony said:
No but I'm sure as I can be that only assembly dll can be put in the GAC.

Then why did you ask the question? Are you trying to trick us? :p
The purpose of GAC is that every application can share all the assemblies
that is stored in the GAC withount having their own copy of the assembly.

The purpose is actually somewhat more than that. Sure, it's great to
not have multiple copies of your DLL assemblies all over the disk. But
that's not the only use for the GAC.

My recollection is that multiple processes can only share assemblies in
RAM if they are from the GAC. And for strong-named pre-compiled
assemblies, being in the GAC means the signature doesn't have to be
verified every time the assembly is loaded, because that verification
happened when the assembly was put into the GAC.

Besides, if there's a benefit to not having multiple copies of DLLs all
over the disk, isn't there a benefit to not having multiple copies of
EXEs all over the disk?

But even ignoring all that:
Storing EXE in GAC would be strange and I assume that I'm not even allowed
to do so becuse it would mean nothing..

I know you already know that you can add an EXE as a reference to
another EXE assembly. So anything that is useful for DLLs is useful for
EXEs, since an EXE can be used just like a DLL (even if it's not the
most sensible use of an EXE).

If all of the above doesn't seem to answer your question, then I
recommend you just go try to install an assembly in the GAC and see what
happens.

Pete
 
T

Tony Johansson

Peter Duniho said:
Of course he did! Tony would _never_ ask a question here about something
so easily tested, without actually trying it himself. He knows better
than _that_.

So, _obviously_ a better question would be not "Did you try?" but rather
"What happened when you tried it?"

;)

Oh, and Tony…what did happen when you tried it? :)

Hi!

I can add an assembly exe file to the GAC but I can't understand what is
should be good for.
I do understand the usefulness to add an assembly dll to the GAC and create
a shared assembly.

//Tony
 
P

Peter Duniho

Tony said:
I can add an assembly exe file to the GAC but I can't understand what is
should be good for.
I do understand the usefulness to add an assembly dll to the GAC and create
a shared assembly.

I hope you understand the explanation I gave in my other reply to this
thread. Including the fact that if you can see why adding a DLL to the
GAC is useful, that should be sufficient to understand why adding an EXE
to the GAC is useful: not only are most of the reasons a DLL in the GAC
can be useful not specific to the "library" nature of a DLL, you can use
an EXE as a "library", so even the "library"-specific reasons would apply.

Pete
 
W

Willem van Rumpt

Tony said:
I can add an assembly exe file to the GAC but I can't understand what is
should be good for.
I do understand the usefulness to add an assembly dll to the GAC and create
a shared assembly.

It serves the same purpose and possibilities as adding a dll to the GAC.
Like Peter said, an exe shares the capabilities of a dll, and can as
such be referenced and used by other dll's or exe's.

Although the usual scenario is to wrap such common functionality in a
dll, nothing prevents one from doing it with an executable.
 

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