Inconvenient programmatically provisioning Web Part instances

Back in October last year I started working with programmatically provisioning Web Part instances. The challenging part was that the assemblies containing the Web Parts’ code were located in the bin directory of the target Web Application. The custom STSADM command I was using for that purpose wasn’t able to resolve the Web Part type. Back then I have found a way to deal with it which I though was a working solution. Unfortunately: just last week I have stumbled upon the same situation: again.

Export Publishing Pages to Features – Imtech OCD Export Page v1.0.0.0

Recently I have found that you could actually provision Publishing Pages using the declarative markup of Features. Right after that discovery I have found that you could benefit of that functionality in quite a few scenario’s, like provisioning test content wrapped in Features. The biggest downside against provisioning Publishing Pages would be having to generate the XML manually. To simplify the process I have decided to create a tool which would export the existing Publishing Pages to Feature XML. Guess what: the tool is ready now and you can take a test drive.

Inconvenient programmatically exporting Web Parts

Programmatically provisioning Web Part instances is an important piece of structured and repeatable deployment of SharePoint solutions. Preferably you would like to be able to deploy preconfigured Web Parts at particular places in your SharePoint solution. In order to do that you need two at least things: the target location where do you want to deploy the Web Part instance and the preconfigured Web Part itself. SharePoint Web UI allows you to export Web Parts. While it’s definitely doable to export a couple of them manually, wouldn’t it be better if we could automate the process?

Provisioning Publishing Pages using Features declarative markup

SharePoint Features allow you to provision all kinds of assets in a declarative way - we all know that. Using XML you can provision not only branding resources like CSS, JavaScript files and images but also Page Layouts and Master Pages. But did you know that using exactly the same mechanism you can provision Publishing Pages?