SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Production Environment : We have Custom Workflows in a Visual studio Project, each time we create a Site based on Site definition we have to reassign workflow association from visual studio. How to avoid this problem ?

In Live Environment : How can we deploy workflows with our Site Definition (list Definition and content types) ?

Any help will be highly appreciated.


share|improve this question
up vote 1 down vote accepted

I would go for:

  1. Make the workflow attach himself to a content type. You could easily do this by adding the Content Type to your solution (deploy via a Site Collection scoped feature - recomanded) and irrelevant of whether you have or not a Site Definition, everywhere where the Content Type gets deployed and used (with the workflow code too of course) it will attached automatically. Here example of declarative connecting them
  2. In the Feature Activated receiver you could programatically attach the workflow to either list, site, etc. depending of course of your workflow intended use. Attaching programatically here or here
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.