Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Sharepoint 2013 Apps upgrades from App Catalog

$
0
0

I added an app on my 'local' App Catalog, then I installed it on different sites.

Now I upgraded the app on App Catalog. How could I push my upgrades to web sites where the app is installed?

How can i get the new version of the app by using the C# code ?

I do some research on sharepoint application page, here is the infomation i find

internalStreamGetAppPackage(string id)
{
    GuidappID = GetAppID(id);
    Streamstream = null;
    try
    {
        SPListItemitemByUniqueId = this.CorporateCatalog.GetItemByUniqueId(appID);
        if (itemByUniqueId.File == null)
        {
            ULS.SendTraceTag(0x63862, ULSCat.msoulscat_WSS_AppMarketplace, ULSTraceLevel.High, "The SharePoint App with list item unique ID {0} does not exist in Corporate Catalog.", newobject[] { appID });
            thrownewSPException(SPResource.GetString(CultureInfo.CurrentUICulture, "CorpCuratedGalleryException_AppWithSpecifiedIDNotExist", newobject[] { id }));
        }
        if (itemByUniqueId != null)
        {
            stream = itemByUniqueId.File.OpenBinaryStream();
        }
    }
    catch (ArgumentExceptionexception)
    {
        ULS.SendTraceTag(0x63863, ULSCat.msoulscat_WSS_AppMarketplace, ULSTraceLevel.High, "The SharePoint App with list item unique ID {0} does not exist in Corporate Catalog.", newobject[] { appID });
        thrownewSPException(SPResource.GetString(CultureInfo.CurrentUICulture, "CorpCuratedGalleryException_AppWithSpecifiedIDNotExist", newobject[] { id }), exception);
    }
    returnstream;
}

i don't know how MS get the appId (the uniqueId the app file)

Any help is appreciated


Viewing all articles
Browse latest Browse all 25064

Trending Articles