Friday, 8 October 2010

SharePoint Solution Generator is dead (for good) - Part 1

SharePoint Solution Generator, part of Visual Studio 2008 extensions for Windows SharePoint Services has been a fantastic tool in SharePoint 2007 development when I needed to create a list definition and list instance quickly.

All you had to do was to create your content types,site columns, and list using SharePoint UI and apply the content types and site columns to your list, then customise your list and create views then finally point solution generator to your list and create your solution package.

 

Combination of the new features of SharePoint 2010 and Visual studio 2010 means no more messing around with add-ons….

SharePoint 2010 allows you to save your site as a wsp package and Visual studio allows you to import the wsp package and select the required elements to include in your solution package! sounds easy? it is :)

 

…so first you need to create your list as before with all required components and customisations:

1) Create your Site Content Type

image

2) Create your Site Columns

image

3) Assign your site columns to your content type

image

4) Create your list/library and assign your content type to your list

To be able to do this you need to ensure you have selected “allow management of content types” from the list advanced settings

image

5) Save your site as WSP package

Site Action –> Site Settings –> “Save site as template”

image

provide a file name and a template name for your template

image

Download the WSP file and save locally

image

6) Import the WSP package into Visual Studio 2010

Create a Visual Studio SharePoint project and select “Import SharePoint Solution Package”

image

Import the WSP file

image

Specify the project elements required in this case the list template

The easiest way to do this is to highlight all items (Ctrl + A) and  deselect one item. this will uncheck all boxes

Then select the “List instance” and “Content type” and click finish (You do not need to include the columns)

image

Say No to include all dependent items

image

Now you have all required components for your solution

image

There are a number of considerations which I will try to cover in the next posts such as including Lookup and Managed Metadata filed types in your solution.

3 comments:

Nipesh Shah said...

Hi,

This is good. But now I update some code in Visual Studio.

Now How to deploy this on server so that i can create a new site based on this new Template.

Also what to select - Sandbox Solution or Not.

Nipesh Shah

Prasanna said...

really good one...it is very helpful.
But i want to create a template with MANAGED META DATA TYPE column.
So could you please help me in this.

SEO said...

Thanks and very nice work my friend i have visited too many blogs and sites
to find out something different about web Analytics service
which i found here.......... keep posting.......http://www.enetspider.com/