Importing Existing SharePoint Lists into Visual Studio 2010 for Packaging

I had a lot of trouble finding information about this. There is a walkthrough that I found and followed:

http://msdn.microsoft.com/en-us/library/ee231603.aspx

  • Create your list in SharePoint as you would do normally. Add some items to the list if you want there to be List Items to also be deployed. I’m going to actually do two related lists. So here they are:

 

  • Follow the walkthrough, exporting your site as a template, then saving the .wsp file to the file system somewhere.
  • Creating a new “Import SharePoint Solution Package” project in Visual Studio 2010:

  • You’ll get prompted for the location of the .wsp

  • You then get prompted for the things you want to import. This includes workflows, content types, list instances – all sorts of goodies. Below, I select my two lists mentioned above:

     

    It’s smart enough to prompt you to add the dependencies:

     

     

  • And there you have it. It even includes the data, if you decided to export that earlier:

 

 

 

 

 

Leave a comment