Create, deploy, and uninstall SharePoint workflow solution packages (WSP)

Source: Internet
Author: User

In the Visual Studio 2005 era, Visual Studio Plug-ins provided a batch file (*.bat) for deploying SharePoint workflows; In Visual Studio 2008, Visual Studio supports the direct deployment of SharePoint workflows. Although it is convenient to design, develop, and deploy SharePoint workflows using Visual Studio 2008来, if you want to deploy a well developed workflow to another server, Visual Studio 2008 does not create a workflow as a WSP file. No batch file was provided.

This article describes a way to build a SharePoint workflow wsp file in Visual Studio 2008. Although this method is not a new method, but know very little, so I am still tired to describe it.

To create a SharePoint workflow Solution package

First you need to install Microsoft Visual Studio Tools for the Office System power Tools v1.0.0.0 and download the following addresses:

http://www.microsoft.com/downloads/details.aspx?FamilyID=46B6BF86-E35D-4870-B214-4D7B72B02BF9&displaylang=en

Then open your text editor to open your work item file (*.csproj), navigate to the bottom of the file, and add the following tag above the </Project> tag:

<Target Name="AfterBuild">
<Exec Command="&quot;C:\Program Files\Microsoft VSTO Power Tools 1.0\Workflow Package Generator\WorkflowPackageGen.exe&quot; /featureManifest:feature.xml" ContinueOnError="true">
</Exec>
</Target>

After you save the workflow project with Visual Studio 2008, the workflow is generated, and the resulting WSP files are found in the project folder, and Manifest.xml, PACKAGE.DDF, Setup.inf, and setup.rpt files are included. Very convenient.

The resulting WSP file also contains the resource files referenced by the workflow, including InfoPath form files referenced in feature.xml using the elementfile tag.

Deploying a SharePoint Workflow Solution package

Save the following command to a batch file (*.bat), where you can deploy the WSP file to a SharePoint farm:

@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe"
%STSADM% -o addsolution -filename WSP文件路径

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.