I've been told to refactor an old ticketsystem we got running here. Most changes I need to do I can accomplish directly on the live system, except the mailbodies for notifications. (I hope)

How can I change the solution ID of the whole wsp package (and the name) so I can redeploy it for a different purpose?

For further information: we are using WSP builder and MOSS (2007)

Kind regards


to change it you would need to change the project name in solution explorer, click on it once so its higlighted and then click on it again to rename or rightclick and then select rename, also the solution.

change solution and project name

Next step isto click on project again and rightclick, this time select properties and change the assembly name and default nasespace giving them the same name as your project name. Click on assembly information and do the same again, you can keep the version number the same.

changing properties name

obviously now you need to go into the classes and change the namespace to the same namespace in the poperties default namespace.

build the project, it might fail becuase it cant find the correct files. Just close the project.

Go to the folder location where its saved and rename the folders to the same as your project name. Open up the project by doubleclicking on the solution file.

It will say it couldnt open up the files, thats becuase its looking up for the old names whats fine :), you need to remove the greyed out project in solution explorer by rightclicking on that file and click remove and then right click on the solution file and select add then exsisting project, goto the folder where the project is saved and add the project with the extension .csproj.

now you should see all the files and folders back in with the new names, build the project.

The last part you need to do is change the guid for the wsp. In visual studios goto tools and the select create GUID, select copy and close it.

create guid

Goto the folder where the project is saved on your harddrive and go into the project folder and find a file called solution.txt and open it, replace the guid with the new one. Save and exit :). Or open it in the project it should be called the same :), just replace the guid!

That should be it, You need to build the app again, then build in wspbuilder and deploy :)

hope it helps :)

  • uff a lot of stuff to chew through. I'll check if it works out and will come back to you. Appreciate it. – Marco Sep 26 '12 at 8:24
  • i know it works as i do it all the time when creating a new copied version lol, it looks like alot but it isnt, its pritty much a copy past! plus youll learn alot in the process and how the wsp is built and what name it uses and where the guid it takes it from ;) once you do it once its becomes easy and you can do it under a min :) – Ali Jafer Sep 26 '12 at 8:30
  • It builds just fine, but won't the MOSS throw an error if the feature has the same ID as before? – Marco Sep 26 '12 at 8:55
  • yup if you dont do the last steps where you change the solution.txt ;) , that is the guid for the wsp that you 100% need to change otherwise it will throw the error saying that there are other solutions with the same id in the store, if you change it you will not get that error and it will be added to the solution store perfectly :) – Ali Jafer Sep 26 '12 at 9:14
  • ahh i get you sorry, yup you would need to change the id lol, i dint know it was for a feature! for some reason i thought it was for a webpart only! You just need to change the ID what is within hex values i think ia 0-9 and a-f but im not too shure on that. Just change some of the digits to somthing else :) – Ali Jafer Sep 26 '12 at 9:23

WSP Builder uses WSPBuilder.exe.config file to create wsp and set all properties...

This link should help changing the name and other properties of wsp: http://weblogs.asp.net/bsimser/archive/2009/11/26/name-that-wsp-sharepoint-developer-tricks-with-wspbuilder.aspx

Arsalan Adam Khatri

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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