Automatically Deploy Any File to SharePoint When you Debug a SharePoint Solution (Norm Estabrook)

Published 31 January 08 11:30 AM

When you debug a SharePoint workflow project, the workflow deployment process copies the feature.xml and workflow.xml to a feature directory on SharePoint.  You can configure your solution to deploy other files as well. For example, you might want to deploy InfoPath (*.xsn) files that provide a UI for the workflow, or a file that contains localized resource strings.

 

To do this, open the feature.xml file of your solution, and add an element named ElementFile for each file that you want to deploy along with your project. Set the Location attribute of the element to the name of the file.

Note   If the file is located outside of the root directory of the SharePoint solution, ensure that the name includes a relative path.

The following example specifies an InfoPath form named InitiationForm. This form is located in the root directory of the SharePoint solution so the name does not require a relative file path.

<Feature  Id="c8ff5406-135a-4fba-8507-ff4d311434a7"

    Title="SharePointFormsWorkflow feature"

    Description="My SharePoint Workflow Feature"

    Version="12.0.0.0"

    Scope="Site"

    ReceiverAssembly="Microsoft.Office.Workflow.Feature,

    Version=12.0.0.0, Culture=neutral,

    PublicKeyToken=71e9bce111e9429c" ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"

    xmlns="http://schemas.microsoft.com/sharepoint/">

  <ElementManifests>

    <ElementManifest Location="workflow.xml" />

    <ElementFile Location="InitiationForm.xsn" />

  </ElementManifests>

  <Properties>

    <Property Key="GloballyAvailable" Value="true" />

    <Property Key="RegisterForms" Value="*.xsn" />

  </Properties>

</Feature>

 

The VSTO documentation has been updated with this information and will appear on MSDN soon.

 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Windows Vista News said on January 31, 2008 4:00 PM:

Interesting point at blogs.msdn.com

# Nikhil Khandelwal said on February 25, 2008 6:41 PM:

More on InfoPath forms deployment for SharePoint workflows at http://blogs.msdn.com/nikhil/archive/2008/01/22/infopath-forms-deployment-sharepoint-workflow-in-vs-2008.aspx.

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

About VSTO Team

This login represents the Visual Studio Tools for Office team. Many members of the team us this account for publishing technical blog posts.

This Blog

Syndication

Page view tracker