locked
Upgrade Custom Web Part Version RRS feed

  • Question

  • Hello All,

    I am new to the webpart developing. However, we have created a custom web part, the problem appears every time when we increase the web part version.
    Except modifying the web.config, dwp files, we also need to delete the old web part on all the pages, and then add the new version back on to the page. Other than that, because this web part has a lot of connections with the other web parts on the page, we need to reconnect them again and again. This is really time consuming. Could anyone tell if there is a good way to do this?

    Could someone also provide some information about how to deliver/pack the sharepoint site?

    Thank you in advance.




    Thursday, January 28, 2010 11:55 AM

Answers

  • Hi,
    this is a known problem and it usually ends up with that you don't change the version number of the Web Part.
    But if you still would like to use versioning, which I think is good practice, you can use assembly redirection to take care of the older versions and upgrade them.
    A while back I wrote a post on different methods for versioning your Web Parts; check it out: http://www.wictorwilen.se/Post/Web-Part-Versioning-with-assembly-redirection.aspx

    On a side note it's good to know that SharePoint 2010 has built-in features for assembly redirection for your solutions.
    /WW
    SharePoint Architect http://www.wictorwilen.se/
    • Marked as answer by cialeen Thursday, January 28, 2010 2:31 PM
    Thursday, January 28, 2010 1:14 PM

All replies

  • Hi,
    this is a known problem and it usually ends up with that you don't change the version number of the Web Part.
    But if you still would like to use versioning, which I think is good practice, you can use assembly redirection to take care of the older versions and upgrade them.
    A while back I wrote a post on different methods for versioning your Web Parts; check it out: http://www.wictorwilen.se/Post/Web-Part-Versioning-with-assembly-redirection.aspx

    On a side note it's good to know that SharePoint 2010 has built-in features for assembly redirection for your solutions.
    /WW
    SharePoint Architect http://www.wictorwilen.se/
    • Marked as answer by cialeen Thursday, January 28, 2010 2:31 PM
    Thursday, January 28, 2010 1:14 PM
  • Hi,

    I agree with Wictor.

    But if you wants to change the location of Webpart in terms of webpart zone then it was difficult to do all those thing which you already said but in that case i could suggest you to go for User control which can be placed on the Page and you can change the location as you change the Site Definition.

    Hope this will help you.

    Thanks Shrivallabh Kulkarni MCTS
    Thursday, January 28, 2010 1:26 PM
  • Thank you very much, Wictor. That saves me a lot of hassle.
    Thursday, January 28, 2010 2:32 PM