Friday, December 01, 2006

SharePoint solution manifests inside and out

One of the major improvements in WSS 3 is the new solution framework, which allows the deployment of Web Parts, Features, assemblies and other files to SharePoint site or farm. The process of deploying a WSS solution has several stages: (1) Creating the solution contents; (2) Compiling the WSP (CAB) file; (3) Adding the solution to the SP site(s); (3) Deploying the solution to the target site(s).

The WSS SDK however does not explain in detail the target locations of the different types of files deployed on the server. In this post I am summarizing my observations that can help you understand what exactly happens during solution deployment.

I assume that WSS was installed in the default installation location, which for most WSS files is C:\Program Files\Common Files\Microsoft Shared\web server extensions\12 and for the virtual directories is C:\Inetpub\wwwroot\wss\VirtualDirectories\.

Assemblies

The Assemblies element contains a list of assemblies to be deployed to the SharePoint web server. These can be web parts, event handlers, web services or any other class that will be used in your application. The parameter DeplymentTarget 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.

The SafeControl element is optional and if added SharePoint will put the assembly element to the SafeControls element in the web.config file of the target web application.

Features

The Features element specifies files with feature definitions.

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

Template Files

This is where most files will be added, including images, themes, web pages etc.

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

Application Resources

In this section are listed resource files specific to the target web application.

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

Global Resources

The resources list contains global resources available to all web applications.

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

Root Files

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

Web Parts

To list the web parts to be deployed use the DwpFile(s) elements to specify the name of the file.

Target Folder: 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.

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

Dovizhdane!