Should we always deploying in GAC ?

Mar 4, 2009 at 3:09 AM

If we have an assembly wich is used only by only one SharePoint Application, should we always deployed this assembly in the GAC ?



Mar 4, 2009 at 7:31 PM
As always. It depends...

The motiviation for choosing between the GAC or a Bin folder are pretty much the same for a normal webapp vs Sharepoint.

A Server only has a single GAC, so any assembly you publish here will be available to your whole server
An assembly published int he GAC has to be strong name signed.
An assembly published in the GAC gets full trust.

For sharepoint, a Server has one bin folder per IIS webapplication. So the scope is slightly smaller than for Assemblies placed in the GAC.
Assemblies in the bin folder run in the secure CAS sandbox.

It's probably easier to deploy assemblies to the GAC, but it's a cleaner approach to deploy them to the Bin folder if you can. Not all assemblies can be placed in the BIN folder though, such as assemblies that contain Feature receivers.

Hopefully this helps,

Mar 15, 2009 at 10:20 PM
Which scenario is the best for the MOSS farm?
Mar 16, 2009 at 5:23 PM
From the perspective of Sharepoint or MOSS, either are fine.

Again, it all depends on YOUR requirements. Sharepoint or MOSS is just the platform. The kind of assemblies that you build and the kind of solutions that you are building determine what's the best scenario.