Tuesday, October 7, 2008

Create feature.xml for workflows using Code Snippet feature

While creating feature.xml or other XMLs from scratch, many people will be feeling a kind of difficulty. Well, this may not be applicable for people who live with visualstudio :). However while starting from scratch i noticed many of the developers are looking for a copy of feature.xml in features folder or somewhere else.

There is a very easy way to get your code snippet using visualstudio Code Snippet Manager.

1.Open your project in Visualstudio and add a new xml file

2.Press Ctrl K, Ctrl B. It should open Code Snippets Manager. We can also open this from Tools--> Code Snippets Manager menu.

3.Select XML from the Language drop down. Click on the Add button.

4.Select "C:\Program Files\Microsoft Visual Studio 8\Xml\1033\Snippets\Windows SharePoint Services Workflow" folder and "C:\Program Files\Microsoft Visual Studio 8\Xml\1033\Snippets\SharePoint Server Workflow"
Note: The second one is bit descriptive and it will come up with tags related to InfoPath forms and details about receiver class and assembly.




5.Right click in editor and select "Insert Snippet" from the context menu.


6.Select the feature.xml snippet. It will give us the Feature.xml we just need to fill up the template.

No comments: