Well, the first thing I would ask is "why GAC?". This is the most
important question...
Other than core framework components and additions (WSE3, WF/WCF/WPF),
you can do most things without using the GAC (just using the default
or custom probing-paths), and hence use "robocopy" depoyment. I find
this works without any difficulty in almost every case; there are some
exceptions (COM facets, serviced components, etc). With this
knowledge, and knowing that I need to be able to deploy easily to a
farm, I tend to design with "robocopy" in mind, hence avoid GAC [for
my own dlls] like the plague.
The second question would be "why deploy the SNK?". This is only
normally needed on a build-server (or developer desktop). Normally the
thumbprint (or hash, or whatever they call it for SNK) suffices.
As for installing into the GAC... at one point, IIRC, msi was the only
supported route, with "gacutil" classed as a development / debugging
tool. I can't be 100% sure, since I (as above) avoid needing to use
it. And don't forget you need to be admin to use it...
Marc
Jon S. - 29 Aug 2007 08:46 GMT
<snip>
RE:
<< Well, the first thing I would ask is "why GAC?". This is the most
important question...>>
While I have been using robocopy for a few years now on this particular
system and have been duplicating the .dlls amongst the Web sites, I want to
some of the assemblies amongst a few web sites on a few Web servers. I have
a utility I have been using to "robocopy-deploy" files to the sites.
I just figured that the GAC is here to help us to share a given assemblies
amongst many applications. In my case they are ASP.NET Web apps... thought I
could simplify things by installing once per server rather than once per Web
site.
Is there some problem with using the GAC? Unless I'm reading you wrong, your
questioning seems to imply that it may be more of a problem than a benefit.
If that is in fact the case, then I'd like to know, as I have not yet
installed anything to the GAC and have just read up on gacutil and how it
needs .snk to do it's job. I was going to roll up my sleeves starting
tomorrow to get my head wrapped around the GAC and make this all happen. But
if you've been there and done that and can tell my why it's not worth it, if
that is in fact the case, I'd appreciate that too.
Marc Gravell - 29 Aug 2007 13:22 GMT
> and how it needs .snk to do it's job.
it needs that the assembly has been strong-named with an SNK (?or
cert?) - however, it doesn't need the actual SNK that was used. The
SNK hash forms part of the full-name of the assembly.
Deploying this may actually present a security risk, in that it would
make it easy for somebody to simulate your dll (including your private
SNK). But generally if somebody can do this they have already
compromised your farm, and you have bigger issues ;-p
> But if you've been there and done that and can tell my why it's not worth it...
In my view, it is just dll-hell all over again; GAC-hell. Disks are
cheap, and having separate copies provides an additional level of
isolation between apps (i.e. you can upgrade each version individually
without having to stress over version-forwarding policies, etc). It
may suit some scenarios (and is a bitter necessity for some that I
already mentioned), but I generally avoid the GAC.
I'd welcome other views from the floor...
Marc
You can use
http://www.codeplex.com/remotegacutil