Upgrading to the SmartPart for SharePoint v1

If you want to upgrade your SharePoint sites to the new version of the SmartPart for SharePoint you should check out Michael Christensen comments on my SmartPart release post. Michael has described how you can avoid having to update each SharePoint site that uses the SmartPart, so the new version is used. Instead you can use assembly redirection (details below). Thanks Michael, btw do you really have thousands of instances spanning hundreds of users? That's cool!

Apparently no documentation exists for upgrading SmartParts which are already in use (without removing and re-adding them to the pages where they are used, which is quite impractical if you have thousands of instances spanning hundreds of users :-)

So I thought I would share what I did (as it is a bit tricky): 

  • remove old SmartPart.dll from GAC
  • install new SmartPart.dll to GAC 
  • ensure the presence of SafeControl entries for both versions in Sharepoint web.config, like this:
    <SafeControl Assembly="SmartPart, Version=0.2.0.1, Culture=neutral, PublicKeyToken=dd064a5b12b5277a" Namespace="SmartPart" TypeName="*" Safe="True" />
    <SafeControl Assembly="SmartPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dd064a5b12b5277a" Namespace="SmartPart" TypeName="*" Safe="True" />
  • set up Assembly Redirection from old versions to 1.0.0.0, as seen here http://totalannihilation.dk/temp/smartpart_upgrade.png

2 Comments

Comments have been disabled for this content.