SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently decided that the assembly name for my solution needs to be changed. The issue is that this solution has tons of web parts active in all different site collections and none will work if the assembly name is changed.

How can I fix this without deleting & reconfiguring every webpart? I have been unsuccessful with powershell thus far. Is there another method?

Update: There does not seem to be a simple way to update this. I will try to persue a powershell solution & return it here at a later date.

share|improve this question
up vote 0 down vote accepted

I truly hope someone has a better answer but if not here are a few options:

  1. Leave the name the same
  2. Edit every single web part in all sites and replace and reconfigure it so that it uses the new DLL. This could be enormous depending on your farm
  3. Create a new project with the name you want but leave the existing project intact and maintain them as two separate projects.
  4. Move all common code into a third DLL and simply use the old and new DLL names as little more than entry points. This would require three projects in total (common DLL, Old DLL, New DLL) but would let you maintain code in one place. The revised version of the old project would have to be deployed once for the change to take effect but could be left alone after that.

option #3 is simplest but leads to duplicate code.
option #4 is the most complicated but offers the easiest path to upgrade existing.

share|improve this answer

Not necessarly, it really depends on how your solution was built. Basically, if you used out-of-the-box ways of creating web part in Visual Studio 2010, tokens for Class names and Assembly names are automatically created in the Elements.xml files, and replaced during compilation (you'll find something like $SharePoint.Project.AssemblyFullName$).

Example for a .webpart file

<?xml version="1.0" encoding="utf-8"?>
  <webPart xmlns="">
      <type name="AccordionWebpart.VisualWebPart1.VisualWebPart1, $SharePoint.Project.AssemblyFullName$" />
        <property name="Title" type="string">VisualWebPart1</property>
        <property name="Description" type="string">My Visual WebPart</property>

These are all detailed here

share|improve this answer
This is true but the values that replace that string become static after the web part is already added to a page. That is the exact value I wish to update, other values such as publicKeyToken remain valid – user13186 Feb 18 '13 at 19:14
Unfortunatelly, in that instance, without building a kind'of Powershell to "migrate" that, i do not see how you get out of it. – Marius Constantinescu - MVP Feb 18 '13 at 19:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.