2
votes

I have developed a web part and deployed it on my server using this guide:

http://leedale.wordpress.com/2007/05/31/deploying-a-webpart-solution-in-sharepoint-2007-the-simple-way/

Now I've modified my webpart and I'm not able to update it on the server. Do you have any guide to advise?
Furthermore, is the guide that I followed correct or is there a more efficient way to deploy and update custom web part on the server?

Thanks a lot

1
What version of Visual Studio are you using? Are you using the Visual Studio WSS extensions?Kit Menke

1 Answers

1
votes

The guide you are following is for deploying a solution file to a server. While you are creating the webpart in your development environment, I wouldn't bother packaging it up each time.

Your most common development path will probably be (the "manual" way):

  1. Write some code in your webpart
  2. Recompile webpart
  3. Install the DLL into the GAC by
    • Drag and drop from your Debug directory into the GAC (Start -> Run -> assembly)
    • OR opening the Visual Studio Command prompt and using gacutil /i "path/to/mywebpart.dll"
  4. Run an IISRESET command

It is important to note that your solution already took care of registering your webpart as a safecontrol in the web.config.

When you are ready to deploy to QA or Production, you would build a release copy of your DLL and then package it up into the solution.

If you have Visual Studio 2008, I would also recommend the Visual Studio extensions for WSS 3.0. It gives you a couple templates that are very useful and allows you to write, package, and deploy a webpart in solution file all from within Visual Studio.

  1. Create a new Web Part project (this is a VSeWSS project template)
  2. Right click on your project's properties, go to the Debug tab, and set "Start Browser with URL" to your SharePoint site (your account will need all the necessary rights to deploy code)
  3. Write some code!
  4. Right click on your project and click Deploy
  5. Add the web part to the site's web part gallery: /sites/SiteCollection/_catalogs/wp.
  6. Add the web part to a page
  7. Repeat #3 and #4!