Monday, September 3, 2007

Deploying WSS 3.0 Web Parts easily to a production server with VSEWSS

There are a lot of pages on the internet which describe building and deploying Windows Sharepoint Services web parts. With the Visual Studio Extensions for Windows Sharepoint Services, creating a basic web parts is a breeze, it's a simple case of starting a new project from the web part template. Then by pressing f5 it creates the necessary files and deploys them. This is great for your development server, but what about when you want to deploy them to a remote server? It gets a little more complicated it would seem. I found a trick today that makes things a whole lot easier. The f5 button, creates a number of files in the \bin\Debug folder for the web part project, one of these is a script, which it uses for deploying the web part. Open this script, and find the section that says: set DefaultWebUrl=http://localhost/ set DefaultSiteUrl=http://localhost Change this to the site URL of your WSS deployment, and then copy all of the files in the bin\Debug folder over to that server, run the script, and it will open a command window outlaying the progress. Once it's completed, you should be able to open your WSS page and simply add the part to the page!

2 comments:

Anonymous said...

You can also specify the URL in the "Start browser with URL" box on the Debug tab of the project properties.

Unknown said...

It is really nice article, is there any way to undeploy the webparts that are deployed using your easy shortcut?