I have a existing solution in production. The WSP is named like this: MyGreatFeature.wsp

Now I want to update this solution with new code/feature definitions. No problem there, but I also want to change the WSP-name to comply with company standards. Thus the new name will be something like: Company.SharePoint.Intranet.MyImprovedGreatFeature.wsp

Is this possible?


Well, there's 2 ways to update a solution. I prefer to uninstall/reinstall. In which case you can use a new .wsp that is named anything you want.

There's also an update solution command, but, I truthfully have never used it.

My steps are below. I have these saved to a text file on my server's desktop for easy access when it's time to do deployments. In the case of an update, you would start with the 'UNINSTALL' block below, followed by the 'INSTALL' block. Change the .wsp filenames accordingly, of course.

FWIW, I have my wsp files in C:\ and run my commands from there.

stsadm -o addsolution -filename mySolution_v1.wsp

    Operation completed successfully.

stsadm -o deploysolution -name mySolution_v1.wsp -allowgacdeployment -immediate

    Timer job successfully created. <<-- worked first time around because feature-set was not web-app specific

  Later on, I had an updated version of the mySoluion.wsp which made edits to the web.config file 
  for the entire web application via a feature that was scoped to "Web Application".
  When I got ready to install the solution this time around, the same 'deploy' code from above
  fails because I did not supply a URL:

stsadm -o deploysolution -name mySolution_v2.wsp -allowgacdeployment -immediate

        This solution contains resources scoped for a Web application and must be deployed to one or more Web applications.

  Thus, I had to add the URL to my command, like so:

stsadm -o deploysolution -name mySolution_v2.wsp -allowgacdeployment -immediate -url http://intranet/docs/

    Timer job successfully created.

    >> Go to Site Settings
    >> Go to Site Collection Features
        >> Deactivate related features
    >> Go to Site Features
        >> Deactivate related features 

stsadm -o retractsolution -name mySolution_v1.wsp -immediate

    Timer job successfully created.

stsadm -o deletesolution -name mySolution_v1.wsp

    Operation completed successfully.

     UPDATE:  (again, I never used this one)
Update-SPSolution -Identity b0915381-25a9-4b01-bd05-a014500a2764 -LiteralPath <\\path\to\new\solution.wsp> 
  • please mark answered if this was of any help to you, or pls comment further if it was insufficient for your needs. Thx!
    – bkwdesign
    Dec 31 '12 at 17:01

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.