tags:

views:

1023

answers:

2

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?

+1  A: 

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.

Kusek
I think it is also important to say that the manifest file of the solution must define that the assembly should be deployed to the GAC and not to the web application's bin folder. This can be defined by the DeploymentTarget-attribute of the <Assembly> node.
Flo
Yes I agree. If you want to make it really simple you can use http://www.codeplex.com/wspbuilder where you need to drop the assemblies to the folder named GAC so that the attribute is taken care by the tool
Kusek
+4  A: 

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:

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.

Alex Angas
Thanks Alex, I use WSP Builder, so I think I'm getting this benefit.
JL