How to deploy a Solution Package


Table of Contents

Once you have followed How to create a Solution Package to create your Solution Package .wsp file. Copy it up to the SharePoint server that hosts the Central Administration. If you are developing on a SharePoint server you can simply run the following from where the .wsp file was created.

install.bat
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o addsolution -filename WebPartSamples.wsp
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o execadmsvcjobs
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o deploysolution -name WebPartSamples.wsp -immediate -allowgacdeployment -allcontenturls
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o execadmsvcjobs
PAUSE

Validating the Solution Package deploys

Once you have run the above script to install the .wsp package you can validate that the files were installed correctly. Assuming that SharePoint was installed in the default installation location. Each of the types of file described in the solution manifest is copied to a particular location.

Assemblies

The parameter DeploymentTarget determines whether to deploy the assembly to the GAC or to a directory (WebApplication).

  • With the GAC option assemblies are copied to C:\WINDOWS\assembly.
  • With the WebApplication option the files are copied to C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin.
DLL changes
You may also find that the new dll deployed may not actually be picked up by SharePoint if no IISRESET/application pool recycle is done. Endless hours of wondering why the new code you've modified hasn't fixed it, because the new code isn't being executed, can send you crazy!
Productivity tools will automatically do this for you such as STSDev and WSPBuilder.

Features

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\

TemplateFiles

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\

Application Resources

C:\Inetpub\wwwroot\wss\VirtualDirectories{virtual app port}\resources

Global resources

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\

Web Part

C:\Inetpub\wwwroot\wss\VirtualDirectories\80\wpcatalog

Site definitions

The SiteDefinitionManifests list contains descriptions of all site definition folders. The Location attribute defines the name of the folder that contains the site definition. This folder contains the ONET.xml and other components of the site definition. C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.



Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. Hosted generously by CustomWare