Not sure if you are aware, but the latest version of SolutionPackager can now extract and re-package CanvasApps (and Flows).
Depending on the version of SolutionPackager you’ve been using so far, it might or might not be failing once a canvas app is included into the solution. However, the latest version is not just not failing, it’s actually extracting the CanvasApps correctly:
There is a caveat, though, and the credit for both running into the issue below and for hinting at the workaround goes to my colleague (without changing any names.. Denis, do you want a link here?)
Either way, when using the solution packager, you can specify the folder. So, if the folder you specify does not include full path, you can extract solution components without any problems:
C:\Dev1\SDK\Tools\CoreTools\SolutionPackager.exe /action:Extract /zipfile:solution.zip /folder:Extract
But, if you try re-packaging the solution:
C:\Dev1\SDK\Tools\CoreTools\SolutionPackager.exe /action:Pack /zipfile:solution.zip /folder:Extract
You will get an error:
As it turned out, there is an awesome workaround! Instead of using folder name only, use full path to the folder:
C:\Dev1\SDK\Tools\CoreTools\SolutionPackager.exe /action:Pack /zipfile:solutionPacked.zip /folder:”C:\Work\Blog\CanvasPackager\Extract”
And it will all be fine:
Can it also extract the content of the msapp file? Would be great for source control…