Forum Discussion

Brett Cohen's avatar
Brett Cohen
Copper Contributor
Oct 16, 2017

Programmatically upgrade SPfx solution instances?

Is there currently method, or is there a method planned to programmatically update SPfx solution instances?

 

Consider the following scenario:

 

A SPfx solution with version 1.0.0.0 is uploaded to app catalog and deployed; suppose it includes a web part.  (Not important that it includes webpart; could be extension, etc.).  Solution is added as "app" to various sites. 

 

Now, version 2.00.0 of the solution is uploaded to app catalog and deployed.

 

When I browse a site that has an instance of the solution (usually in "classic mode"), I will see an option under details to upgrade the solution.

 

However, if we have 100/1,000/10,000 instances of solutions deployed, it is not feasible to manually upgrade individual SPfx solutions through the UI.

 

Is there a means updating solutions programmatically?

 

(Note: if you do NOT change the versions in the SPfx .json files, and keep the solution at 1.0.0.0 and replace in app catalog, you can immediately "upgrade" the SPfx solution for all instances; however this is not ideal as we might want scenarios where some people remain on 1.0.0.0 and some go to 2.0.0.0).

Resources