Tuesday, July 24, 2012

SharePoint2013 Beta AddToLatestVersion

Scenario: When you install SharePoint 2013 beta, you will observe there will be both 14 hive and 15 hive. So you have been given a solution pkg (.Wsp) developed in VisualStudio2010. How will you deploy the solution so that all the artifiacts inside the .WSP get deployed to 15 hive.

Solution: By default when you excecute the "Install-SPSolution" PowerShell cmdlet it deploys the WSP artifacts to 14 hive. To force the artifacts of the WSP to be deployed to 15 hive, you have to use "AddToLatestVersion" switch as below.

Install-SPSolution -AddToLatestVersion -Identity $wspFilename -WebApplication $webapp -GACDeployment

No comments:

Post a Comment