This is a useful article when converting a custom workflow project from Visual Studio 2008 to Visual Studio 2010:
In a nutshell,
- Go ahead with the conversion wizard
- Add a new Project (2010 Sequential Workflow Project) to the solution
- Rename the Workflow1 folder to the new name – Very Important, you have to keep this folder in order for the workflow to be in the feature, so just rename it.
- Copy the old workflow.cs file to the new folder in the new project. This will bring over the designer file and rules file (if applicable).
- Delete the worflow1.cs and update the class name to the new class name
- Copy over all other files that are not related to packaging such as Utility classes.
- Copy default namespaces to new project. Check your default namespaces, namespaces in Elements.xml, assembly versions
- Update namespace in new project on the .cs file, and .designer.cs file.
- Compile, if does not compile, may have to remove Office reference in using statements, also may need to remove and re-add Reference to SharePoint.dll
- Rename Feature from Feature1 to include new version
- Add complete namespace and assembly name in 4 locations on Properties: Assembly name, Default Namespace, Assembly Information Title, and Description
- Check Feature, Double click Feature to see Description, change with version number
- Check Solution, double click package to see Name, change with version number
- check Elements.xml for correct namespace in CodeBesideClass location.
- Remove any old deploy folder with old manifest.xml or solution.ddf
- Remove old workflow project from the solution
- Change Class name to match new class in workflow.cs file
- If correlation token error, check .designer file to reference new class name
- Compile and run the workflow before editing code.
- Check in with new only new project in the solution.
- If Failed to Start error, most common error is namespace or class name.
Leave A Comment