Upgrading Features.

I’ve been quite naughty recently and I’ve been taking the easy way out when it comes to putting code upgrades in. It’s very easy to drag the DLL from the dev environment and just drop it into either the Gac or the local Bin, without any thought to what happens if someone comes along and re-uses the .WSP file in future!!

So today I actually spent some time figuring out the stsadm -o UpgradeSolution command and testing it on my live environment to perform some upgrades to live code. The result, it worked quite nicely thank you and I’ve documented this into our ongoing procedures.

So, How does it work, Well in reality, it’s no different from deploying a solution for the first time. You copy your WSP file into the holding area, in my case it’s D:\InboundProjects.

Then enter the following command (tailored to fit your deployment options of course..)

stsadm -o UpgradeSolution -name MYSOLUTION.WSP -filename D:\inboundprojects\MYSOLUTION.WSP -immediate -allowcaspolicies

Follow this with a quick stsadm -o execadmsvcjobs to force the time job to run and bingo, the code is live. And just for my own happiness, I had an explorer window open to the local webserver wpcatalog directory just to be certain it updated the deployedf files correctly, which it did.


Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.