It is a continuation of previous article, if you’ve missed it. I recommend you to first walk through the links provided above suggestion for SharePoint Framework.
In this article, I’ve used same project which I had created in previous article “How to Provision SharePoint assets with solution packages“.
Here, I’ll demonstrate, how to upgrade existing SharePoint Framework (SPFx) app in SharePoint Online.
Now, open existing project in Visual Studio Code and add a new element file named as “elements-v2.xml” with content showed below:
Add another XML file “upgrade-actions-v2.xml” for upgrade action. It should’ve location based on the folder name as a GUID which is placed under SharePoint -> Solution -> debug.
Now make below highlighted changes in “package-solution.json”. You must change below mentioned attributes:
- version – It should be increased.
- elementManifests – It will also include “elements-v2.xml” file.
- upgradeActions – It will hold file name of upgrade actions i.e. “upgrade-actions-v2.xml”
Now run below command:
gulp bundle –ship
Thereafter, create a package for our solution using below command:
gulp package-solution –ship
Now, again deploy (refer “How to Provision SharePoint assets with solution packages”) package .sppkg file. After deployment, you’ll see upgraded version of file in app catalog as below:
If you click on app’s tile, you shall see message to to get upgraded version of app.
Click on Get IT button and see the effect. You’ll see additional new list under site contents.
I hope you enjoyed learning this tutorial and It will help you to move forward in SharePoint Framework (SPFx) world.
Please share your suggestions in the comment box below about this tutorial. This will help me to provide useful content moving forward .
Hope you enjoyed reading it.
Please don't forget to Share, Follow and Like to get updated with latest posts.
It gives me motivation to share more knowledge with you.
Project Management Professional (PMP) and Microsoft certified, motivated, energetic and accomplished Project Manager / Architect with 15+ years of work experience in Management, Architecture, Analytics, Development and Maintenance. I have been fortunate to be a part of over 25+ .Net / SharePoint projects delivery with various companies across different industry sectors. This has provided me a valuable insight and experience especially in successful implementation of SharePoint based solutions.
My experience in Web application implementation includes technology strategy and road-map definition, business and technical requirements identification, governance, platform architecture, solution design, configuration, development, quality assurance, training, post-production support, team lead and overall project delivery along with project management.
Satyendra Mishra holds a B.Tech. in Computer Science & Engineering and PG Diploma in Advance Computing from Center for Development and Advance Computing, Pune, India. He is also a certified Project Management Professional (PMP).
I love to share Project Management Tips and Tricks by writing Blogs in the Project Management India Community. I have written around 300+ articles in the Project Management, .Net, SharePoint and related client side technologies.