SharePoint_aint_broken

Updating files in an App Part (SharePoint Add-in)

This post was most recently updated on September 30th, 2022.

2 min read.

Luckily, SharePoint Add-ins (or App Parts, like they were called earlier) are slowly getting killed and rooted out of all the sites they once were deployed to – and I don’t think anyone’s going to miss them. However, as so often happens with legacy implementations, there will still be thousands of sites, where SharePoint administrators and developers will be responsible for maintaining and developing the solutions further. This will occasionally require updating app parts, which is a process that kind of sucks. Here I’ll try to simplify the process.

Problem(s)

Not all the files in an app part are updated during the deployment and upgrade of the app. This is difficult to debug and leads to new functionality or enhancements not being applied to the target system.

Solution

Time needed: 15 minutes

Make sure you’re versioning your files correctly. Typical, old-school SharePoint Add-ins contain altogether 3 places where you’ll need to manually change a version number for each version. So be sure to check these out before you deploy:

  1. AppManifest-file


    SharePoint_AppPart_AppManifest
    AppManifest for SharePoint Add-ins (or App parts, you know..)

    <li><strong>Feature properties</strong><br>
    </li>


    SharePoint_Feature_Properties
    SharePoint Feature Properties

  2. <li><strong>Feature upgrade instructions (template file)</strong><br>

    This is probably the most retarded step and the most difficult to remember. You’ll need to modify the feature’s versioning and make sure the elements.xml -files that coordinate which files to update on app part deployment are referenced. You’ll need to edit a feature, select its manifest, and scroll all the way down to edit the manifest. Try to make something out of this screenshot below:<br>
    </li>

    SharePoint_feature_upgrade
    SharePoint Feature Upgrade

  3. After changing all of these three, you can publish/package the app, deploy the app part to the app catalog, and then update it on the sites you’ll be using it.


What a drag, right? Ah, but that’s SharePoint.


And now that you’re done with this stuff, go do something nice, and hope you’ll never have to update any more App Parts (or SharePoint Add-Ins, or whatever they are called this month).

mm
4 1 vote
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments