Dev Tip: The SharePoint University of Reverse Engineering

Posted on 2/10/2008 @ 12:48 AM in #SharePoint by | Feedback | 6351 views

Have you written features? If you haven't, you should be - because that is the right way to deploy stuff to your sites.

But if you have written them, I bet you have seen yourself trying various elements in the elements.xml file(s), guessing, and heck even reverse engineering parts of sharepoint that ship with sharepoint.

Here is a quick trick.

You can export the entire list schema as CAML using the following -

http://yoursiteurl/_vti_bin/owssvr.dll?Cmd=ExportList&List=%7YourListGUID%7D

This is quite awesome, because it straight off gives you all the Fields, Views, and Content Types involved.

From here, you can copy paste stuff into your feature.

Nice huh?

Sound off but keep it civil:

Older comments..


On 2/10/2008 11:36:14 PM Waldek Mastykarz said ..
There is one major drawback to using this approach. More details @ http://www.sharepointblogs.com/tmt/archive/2008/02/04/inconvenient-sharepoint-solution-generator.aspx. Furthermore I haven't succeeded importing the exported schema.xml. I had to process it with some extra methods before importing to SharePoint - just like SharePoint Solution Generator from VSeWSS extensions.


On 2/11/2008 2:14:12 AM Sahil Malik said ..
Point taken Waldek. This is merely a starting point, so you don't have to guess the element names. Significant cleanup is required.


On 2/12/2008 4:13:25 PM Becky Isserman said ..
Have you tried using the new VSeWSS1.1 and features? After a while I realized that you could now create a Blank Solution and add what they call a "Module" and now they are using a module.xml (not elements). I like the name change it's less confusing, but it feels like they pulled the rug from under us.


On 2/12/2008 8:50:03 PM Sahil Malik said ..
VSeWSS is better than 1.0 :)


On 9/19/2008 11:38:29 PM Tim said ..
Great post. This is one of my oldest and best tricks. Anyone who hasn't read up on the URL protocol for calling owssvr.dll in the WSS SDK is really missing out. I was in your sessions at the Best Practices conference in Virginia. Very well done, Sahil.


On 9/20/2008 10:59:54 PM Sahil Malik said ..
Thank you Tim. Good to see you there :)