System Files

SPSF contains several system files which play an important role during development and deployment.

Files used during development

SharePointConfiguration.xml

The file 'SharePointConfiguration.xml' is located in folder "Solution Items".
The file contains several standard SharePoint element like ContentTypes, Features, ListTemplates etc.
These elements are used during execution of a SPSF recipe within the dialogs to fill selection boxes and lists with these SharePoint artefacts.
This file should not be changed and will be replaced automatically during an upgrade of SPSF.

Files used during build

SPSF.targets

The file 'SPSF.targets' is located in folder "Solution Items".
The file is referenced by all projects in the VS solution to run task during the build of a project. This tasks includes
  • Generation of web solution package file (.wsp)
  • Execution of code analysis tools
This file should not be changed and will be replaced automatically during an upgrade of SPSF.

Files used during deployment

SPSF solutions in Visual Studio always contains a project with name "Deployment". This project is used for the deployment of the WSP packages to one or multiple SharePoint farms.

How it works:

  • After building a SPSF solution in Visual Studio a folder is created in the directory "Deployment/Package" based on the build configuration (typically "Debug" or "Release"). This folder contains the final deployable package and is the output folder for the whole Visual Studio solution.
  • Building a SharePoint project which uses the SPSF.targets (see above). will create a WSP file in the output directory ("bin/Debug" or "bin/Release")
  • Building the "Deployment" project (which should depend on all SharePoint projects), it will collect all WSP files from the output folders of the same build configuration of all SharePoint projects, and also 3rd-party WSP files which you added to the "Deployment/Solutions" folder.
  • All WSP files are then copied together in the "Deployment/Package" folder
  • The environment configuration XML files in the "Deployment/Environments" folder define how and where the solutions should be deployed on each farm. These files are copied to the deployment package.
  • The project "Deployment" contains a folder "Batches" with several batch files (e.g. Deploy.bat) to start the deployment process later. During a build of project "Deployment" all contents of this folder are also copied to this final output folder.
  • Also the PowerShell scripts in the "Scripts" folder will be added to the package

Configuration of the deployment process:

The deployment process is defined in XML files. They describe the tasks and parameters which are used during the deployment of WSP files to SharePoint and which tasks must be executed before or after the deployment.

How to configure the deployment for multiple farms, re-use settings and set up deployment parameters is described in the project SPSD SharePoint Solution Deployer which you can find at http://spsd.codeplex.com