SharePoint Solution Generator - Deploying to a Production Server

Just a short note on the SharePoint Solution Generator - which is a great little tool!

If you don't have the SSG yet, it is part of the Visual Studio Extensions for WSS v3.

Customize your SharePoint site adding web parts, lists etc., then point the SSG at it, and it generates a Site Definition. Open the Site Definition in Visual Studio. Right click on the solution and select "Deploy", and assuming you are working on the server where you want the new Site Definition installed, it deploys the new Site Definition to that server.

But what do you do when you want to deploy your new Site Definition to a Production Server where installing Visual Studio is not an option?

Well, there must be an easy way, I wish I knew what it was, and hopefully someone will chime in and let us know, but in the mean time I thought I'd share a manual process that has worked for me.

The jist of it is that you need to:

  • copy the new files and folders that are created by the deployment on your development server to the production server
  • copy the DLL that was created to the GAC on the production server
  • use STSADM to deploy all of the features that were created (there will be one feature.xml in each folder created in Template/Features)
  • either use STSADM or the Admin UI to activate those features

Once all of that is accomplished, then you can go create a new site using the Site Definition.

The folders and files you'll need to copy are in:

  • Template/Features
  • Template/SiteTemplates
  • Template/1033/xml

The new folders have the name of your solution plus a guid at the end, making them easy to find.

The STSADM commands for deploying and activating a feature are:

  • stsadm -o installfeature -filename <FeatureFolder>/feature.xml
  • stsadm -o activatefeature -filename <FeatureFolder>/feature.xml -url https://site

There should be one feature.xml file in each of the new folders created in Template/Features, and you have to run this command for each one of those feature.xml files.

I hope this is helpful.

Comments

  • Anonymous
    August 17, 2008
    u need not to do all this once u compile the project and check the bin folder .. it drops a solution file which u can pass to production environment....