When you have to import the workflow in your solution, like for Sandbox solution. So, how you will be importing that list workflow in the VS 2010 sandbox solution. Many of us find like import reusable workflow in the VS 2010 solution. But what about the list workflows. And suppose if their is more then one workflow. I have also search lot on this topic and does not get not much help.
To import List workflow on the VS solution. Create a WSP of the Site and import using the VS template for SharePoint. Now Copy the ListInstances(On which list workflow are created),Modules of the workflow and WorkflowAssociations folders in our custom solution. Now build the solution. It will give some errors of workflow. So over come the errors add reference of following references
It will resolve the some of the errors. Now it will be giving the XOML errors. So to overcome these errors,you have add the same line of the tag from “importsolution.csproj” file to “customsolution.csproj”. Make it similar as import solution.
The changes should be done for workflow.xoml, workflow.xoml.wfconfig.xml and workflow.xoml.rules for all the workflow which are associated with all the list in the WSP. Now all the error will resolved. Deploy the solution and test. The workflow will work fine.
It will help in creation and deployment for the sandbox and SPD workflow. Comment if any help needed.