Question

I have exported a Sharepoint 2010 list as a list template (.stp file) via the UI.

Is there any way to import this list template back to Visual Studio 2010 or is my only chance to extract the .cab file and go through the manifest.xml manually?

Was it helpful?

Solution

moontear! Yesterday I gave some thoughts to the same matter. Unfortunately, I couldn't find the solution to import the list template to VS 2010. It seems, that Microsoft deprecated .stp files in SP 2010 and replaced them with .wsp one. Therefore, I found two solutions: The first: Working with .cab files, as you said. The second: Make the template of the whole site and copy the list from it to your project in VS 2010.

OTHER TIPS

I'm in agreement with @Deniplane. If there is data in a SharePoint list that needs to become part of my Visual Studio 2010 solution, I export the .stp and lift the <Data> node from the manifest.xml and put it into my list template file in Visual Studio (in my scenario the list def is already in my project, but I'm trying to get default data nodes into the definition).

In one case, I use regular expressions to delete a number of superflous elements from each <Row> since the amount of default data was rather large and it took too long to clean it out by hand.

However, if you're trying to incorporate an entire list definition back into your Visual Studio sln, then, I always have to go with Deniplane's 2nd option.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top