tags:

views:

29

answers:

1

I have created a site in SharePoint 2010 and saved it as a site template. Next, I have created a custom workflow in Visual Studio 2010. The final product of the site template creation is the .wsp file (a package), and the final product of the workflow coding is another .wsp file.

What I need to do now, is to extract my workflow feature from the corresponding .wsp file and to integrate it with my site template's .wsp file. My ultimate goal is to be able to create a new site from my site template and to have my workflow in it, and to avoid separate feature activation. Is it possible to achieve this, and if yes, how should I do it? Thanks.

There's the same topic at MSDN

+1  A: 

Here's how I did it in the end:

  1. In Visual Studio 2010, I created a new project. I used template SharePoint > 2010 > Import SharePoint Solution Package.
  2. I specified my site template and checked all features (in fact, they are all checked by default)
  3. Next, I added new item to my newly created project - a workflow.
  4. Then I started a new Visual Studio 2010 instance and opened my workflow code.
  5. I copy/pasted my workflow code from the second instance of VS (started in the previous step) to the first instance of the VS, right into the added workflow item.
  6. I built the new solution which created a new .wsp.

The new .wsp was the same as my original site template, but it had my workflow feature inside. Nice!

Boris