Does Save Site as Template preserve Version History in sp2010?
Posted
Thursday, February 11, 2010 4:18 PM
by
CoreyRoth
It looks like the answer is no. When you click the Include Content checkbox on the Save as Template page, it looks like only the latest version of documents and lists items are included in the .wsp file. I ran a few tests and here is what I saw. Consider the following document with its history from the source site.
After I export the site, install and activate the solution on a new site collection and then use the Create Site menu to create a new instance of my site template, only the latest version of the document is there. Now, I’m not complaining as this is already a great step in the right direction and it really does make moving things around between servers easier. In the screenshot below though, you can see that only the latest version is present.
I’m not really sure why it creates two versions of the document (with different file sizes even), but I am sure there is a reason. If you haven’t use Save Site as Template, be sure and check it out. It does export content (including documents). Your documents are packaged up in the .wsp and use the module element to copy them via feature to your document library. Here is what your package looks like in Visual Studio 2010.
As you can tell from my string of posts lately, I am really excited about the Save Site as Template functionality. We all would have killed to have it in WSS3. It really is a great way to see how things are built behind the scenes to using CAML.