Wednesday, September 17, 2014

14 and 15 hives, and upgrade solution/features

 

This must not be new and I seem have done this at least once back February, because for the master page in question, I have the same file dated back in February both in the 14 and 15 hives.

But I have forgot completely what I did back then, and spent the entire morning just to update the same master page file. So this time, I write here what I learnt (again) today, so it would be clearer what to do for the next time.

The conclusion first. I need to run this cmdlet:
Install-SPSolution -Identity (the solution file name) –WebApplication (web application name) -FullTrustBinDeployment -CompatibilityLevel All –Force

We are operating a site that we have upgraded from 2010 (we started with 2007 actually). Therefore (I do not know now if it was THE way to go but), FEATUREs that we have been using from the time of 2010 including this master page that I wanted to update today, reside in the two hives.

For FEATUREs that I need to update since the upgrade to SP2013, I have specified SharePointProductVersion="15.0" in their solution manifest, and run simply stsadm –o upgradesolution (I prefer STSADM to PowerShell). They are correctly updated. We have got what we want in the effect.

Today, however, I found one shortcoming (I must have in February too), which is that the ghosted image of the master page that you see in SharePoint Designer stays as it was before i.e. not updated.

First I thought it is probably due to the cache, but at the end concluded that SPD looks into the 14 hives rather than 15. When I update the file in the 14 hive as well as 15, with the above cmdlet, you see properly the updated image in SPD.

I think this is absurd. I do not see any logic. But it appears to be the way it works...