SPNote

SharePoint Notes

Workflow Code Snippets

When the workflow code snippets are not loaded in Visual Studio (especially VS 9.0),

[Instruction]
1. Go to Tools > Code Snippets Manager
2. Change the language to XML
3. Add
- Workflow snippet for VS 8.0:
  %Program Files%\Microsoft Visual Studio 8\Xml\1033\Snippets\SharePoint Server Workflow
- Workflow snippet for VS 9.0:
  %Program Files%\Microsoft Visual Studio 9.0\Xml\1033\Snippets\SharePoint Server Workflow

If you have done the instruction, go back to your feature or workflow xml file and press Ctrl + K, X and select SharePoint Server Workflow then you could see five options you can select. They are Element File Tag, Feature.xml Code, Modification Form Tag, Task Form Tag, Workflow.xml Code.

[Note]
Even though I installed OfficeServerSDK.exe but the workflow code snippets are not loaded automatically on Visual Studio 9.0 (2008). I looked through paths between 8.0 and 9.0 and I found out the SharePoint Server Workflow folder wasn’t copied to 9.0. So I just copied it to 9.0 and done!!! It worked as I expected.

If you didn’t install VS 8.0 on your pc then you can post your comment here then I’ll upload those files into zip for you. Or maybe there is a SDK for VS 9.0 so you can search on MSDN downloads.