Imtech Run PowerShell Script Deployment Step

In my previous article I wrote about extending the Visual Studio SharePoint development tools. Now it’s time for the first extension: Imtech Run PowerShell Script Deployment Step.

Extending Visual Studio SharePoint development tools with custom Project menu options

SharePoint 2010 ships with a great development story. Using the new Visual Studio SharePoint development tools you can create SharePoint solutions easier and faster. Visual Studio SharePoint development tools provide you out of the box with a great number of Project and Item Templates which allow you to create the most commonly used SharePoint artifacts. Using the new SharePoint Server Explorer you can explore all the different objects within your Site Collection and using the Validation Rules and Deployment Steps you can package your work into a WSP package and deploy it to your server with a single mouse click. Yet I think that the most exciting part about the new Visual Studio SharePoint development tools is the extensibility, because the possibilities are almost limitless.

Generate your own SPBuiltInFieldId class

SharePoint ships with the SPBuiltInFieldId class which allows you to access the ID’s of all the out-of-the-box available fields using intellisense. This is very important in scenarios when your solution heavy relies on custom development and working with list items. The SPBuiltInFieldId class makes working with Content Types and Columns easier: instead of typing the names you can use the Properties of the SPBuiltInFieldId and get to all the standard SharePoint fields using intellisense.

Visual Studio T4 template for SharePoint Feature Definition (Feature.xml)

Recently I wrote an article about automating the generation of the DDF files used to package SharePoint Solutions. In my example I used a custom Visual Studio T4 template to generate the DDF file. As a scenario I used a Web Content Management (WCM) solution, which contained a lot of assets to be provisioned to SharePoint. While working with WCM solutions generating and maintaining the DDF files is not the only challenge. As all the different assets are being provisioned using Features you also have to maintain two more files: Feature.xml and Elements.xml. Once again the T4 templates can help you get the job done.

Visual Studio T4 template for SharePoint Solution (DDF)

Packaging solutions built on the SharePoint platform into WSP packages has proven to be the way to deploy your work in a structured and repeatable manner. While there are many different tools available which can support you in packaging your work, there are scenarios when they are not sufficient. As some of the tools are open source you could modify them to fit your requirements but did you know that Visual Studio can help you with creating WSP files?