About Me

My photo
a Dynamic and Energetic guy.....

Monday, December 8, 2014

How to Upgrade A SharePoint App


When we develop SharePoint App we can’t do fresh deployment every time. We have to upgrade our solution when changes append to the system. There are few thing that we have to do in the code for upgrades. But here we are doing the deployment steps.
First we have to go to the APP and get the version.

Our next deployment should be grater than the current version of the APP. We can get the version using APPMANIFEST.xml


Now we have to use PowerShell commands to upgrade the solution. First we have to IMPORT the package to server.

It will pop up to packages from the TRUSTED SOURCES.
 Once we PRESS Y, it will import to the site collection.

When we get the instance of the APP, we can execute Upgrade function.

When executing it, we can see Site collection also updating the APP.


So we will only update the APP, not a full deployment.


$spapp = Import-SPAppPackage -Path E:\Deployment\TRCA.app -Site http://spsvr:1111 -Source ([microsoft.sharepoint.administration.spappsource]::ObjectModel)

$instances = Get-SPAppInstance -Web http://spsvr:1111

Update-SPAppInstance -Identity $instances[2] -App $spapp

No comments:

My Masters