JL.
JL.

Reputation: 81342

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

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?

Upvotes: 6

Views: 12517

Answers (3)

user1251131
user1251131

Reputation: 41

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.

Upvotes: 4

Alex Angas
Alex Angas

Reputation: 60058

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.

Upvotes: 10

Kusek
Kusek

Reputation: 5384

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.

Upvotes: 2

Related Questions