Friday, January 25, 2008

How to Package a SharePoint Solution (Or How to Rip all of your hair out)...

As I sit here well past 5:00 PM for the second time this week, I wonder what is the best way to package up you custom SharePoint solution to deploy to a production environment. We have tried many ways in the current project we are working on and none of them have proven to be viable methods or consistently deploying our customizations to prepare for the final production deployment next week. The initial project began with creating custom lists, content types, and site columns through the UI. Early on, we realized that we would need some way to move these customizations to the production server and quickly decided that Features and Solutions would be the way to go. We began with using the SharePoint Solution Generator to generate the list definitions. This seemed to work well except we ran into some issues with the generator producing errors and failing.

So onto Plan B. This was to generate the definitions and then put them into Feature files ourselves. This was way too manual and would take longer to package then to create the customizations. So we moved to Plan C. This required the Visual Studio extensions to WSS. This allowed us to package up the Features and deploy them from Visual Studio. We ran into some issues asgain with the extensions not providing all of the functionality that we needed and so I looked for another alternative.

We settled on the CTP 1.1 version of the Visual Studio extensions for WSS. These proved to contain all of the Features that we needed and would deploy reliably over and over again. Or so we thought.

We went to deploy the entire customization solution to prove to ourselves that the entire project would work in production and found some interesting results. When we tried to deploy the solution from the batch file, it died in the middle of activating the Features. This would never work in the production environment. We needed a stable deployment mechanism. So we deleted the web app and started over and this time the solution was deployed but we didn't allow it to activate that features, that way we could manually activate them. This worked reliably but it is quite manual; we had to build in Feature dependencies to make sure that the Features were activated in the same order. Another issue we ran into was that we needed to deploy our base system to two subsites in a single site collection. This did not work by using the VS extensions. The GUIDs that are created are only unique when the Solution is re-deployed from within VS. We needed new GUIDs each time it was deployed from the batch file. When we did the manual activation it worked fine.

The question I pose to all of the other SharePoint developers out there is: What is the best way for deploying customizations to a production environment right now? I realize that the answer will depend on the circumstances but in general what has worked for you?

Labels: , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home