I created a SharePoint Framework web part and deployed the package to the App Catalog on my client's O365 tenancy. My client has added the web part to around 150 sites.

I've since deployed a new version of the package, which contains some important updates to the web part, to the App Catalog. I can upgrade the web part manually on each site from the Site Contents page (i.e. exactly the same as the add-in model). However, I don't really want to do this manually 150 times. As far as I can see, there aren't any hooks for automating or scripting this (CSOM, PnP PowerShell ,etc) - any ideas?

Edit - to clarify the behaviour I'm seeing, here's a couple of screenshots. On the Site Contents page: enter image description here

And on clicking through:

enter image description here

  • 1
    If you only updated the code, you should be able to simply redeploy your assets to your CDN location. – theChrisKent Jun 13 '17 at 13:15
  • 1
    did you change the version number, or have you added any new properties? these seem to cause isues . – russellg Jun 14 '17 at 0:51
  • Thanks guys. I did change the version number of the package. Redeploying the assets to the CDN won't solve the problem alone, as the SPFx tooling generates different unique names for various assets every time you bundle - so we do also need to deploy a new sppkg to the App Catalog (either that or hack around with the build process). – Jason Lee Jun 14 '17 at 8:39
  • 1
    If you do don't change the version number you wont need to do the upgrade. – russellg Jun 14 '17 at 12:19
  • Thanks @russellg - that did the trick. I rebuilt the package using the original version number and redeployed to the App Catalog. All instances of the SPFx web part are now using the updated code. – Jason Lee Jun 15 '17 at 10:05

You shouldn't need to "upgrade" anything. As soon as you update the package in the app catalog, all running webparts will use the updated manifest, which should point to the updated code.

  • 2
    Thanks, but that's not the behaviour I'm seeing. On each site that includes the web part, on the Site Contents page, I see the message An update for this app is available (i.e. the behaviour is exactly the same as the add-in model). I can either leave the site running the old version of the web part, or I can click GET IT and get the new version. I did change the package version number before I re-deployed to the app catalog - if I left this unchanged (not a great software development practice), would the web parts automatically use the updated manifest? – Jason Lee Jun 14 '17 at 8:18
  • 2
    Yes - they should use the updated manifest. If there was additional upgrade actions in your feature XML you would need to explicitly update them. This is good feedback though - ideally we shouldn't say "upgrade this" if upgrading isn't going to do anything material. – PatMill_MSFT Jun 14 '17 at 18:24

Here is something I recently did to bulk upgrade the solution in a scenario where I added new webparts to a project and had to increment the version number. This meant I had to upgrade the solution in each site collection that it was deployed to : http://vipulkelkar.blogspot.com/2018/08/bulk-upgrade-spfx-solution-in-multiple.html

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.