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?
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.
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 .
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
.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With