Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharePoint: Will deploying a WSP install DLL's in Gac?

Tags:

sharepoint

I was wondering, if I deploy a WSP using the stsadm command:

 stsadm -o addsolution –filename myWSP.wsp

Will this also install the required DLL's (already included in the WSP) into the GAC?

Or is this another manual process?

like image 522
JL. Avatar asked Aug 27 '09 06:08

JL.


People also ask

What is GAC deployment SharePoint?

The GAC stands for the global assembly cache. It is the machine wide code cache which will give custom binaries place into the full trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, and therefore are put into the GAC.

How do I add a DLL to SharePoint?

1 Answer. Show activity on this post. As you have SharePoint installed on the development machine (you must), hit Browse... on the Add reference dialog, and you can find the DLL from C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\ISAPI .


3 Answers

This is determined by the DeploymentTarget attribute in the solution's manifest.xml. If you are maintaining this file yourself, using the following syntax will deploy the code to the GAC:

<Assemblies>
   <Assembly DeploymentTarget="GlobalAssemblyCache" 
             Location="MyGAC.dll" />
</Assemblies>

If you are using a tool to create the solution, it depends on the tool. WSPBuilder defaults to deploying to the GAC however it can be configured otherwise. See the "Scoping the assembly for BIN instead of GAC (including Code Access Security generation)" section of this article by Tobias Zimmergren for steps on how to deploy to bin.

like image 157
Alex Angas Avatar answered Sep 20 '22 00:09

Alex Angas


If you're building the packages via VS, open the Package and click the Advanced tab on the bottom. You'll be able to add additional assemblies and specify the Deployment Target from here. I'd strongly recommend doing this rather than updating the XML directly...but that's just me.

like image 41
user1251131 Avatar answered Sep 18 '22 00:09

user1251131


As the command says addsolution it is just going to add the solution to the Solution store. You need to call the command deploysolution to get the stuffs to place. Here is the command that you need to call

stsadmin -o deploysolution -name [solutionname] -allowgacdeployment

Note that allowgacdeployment is mandatory to place the files to gac. you can more help on this command with this

STSADM.EXE -help deploysolution

There is an alternate option to get this done,through UI. Go to Central Admin -> Operations ->Solution management select the solution and say deploy. this will be easier way to get it done quick.

like image 30
Kusek Avatar answered Sep 22 '22 00:09

Kusek