Removing Gulp from your CI Pipeline for Helix style solution with PowerShell

As previously discussed, if you have an Helix style solution, and you want to replace Gulp with PowerShell this script can come quite useful…

The principle is not to use Gulp for Build and packaging neither on your local environment (see this other post to see how to do it: https://sitecorecommerce.wordpress.com/2019/11/02/powershell-to-publish-helix-base-solution-with-visualstudio-2019-without-gulp/

neither on your Build server / Azure Pipeline….

as you can imagine PowerShell is your friend 🙂

In my specific example, I have instrumented it with VS 2017 but this script would work with any version of MS Build assuming that all parameters are supported….

BuildAndPublish

The principle is a pretty simple loop through all the project in Feature / Foundation / Project and just calling a simple MSBuild command to publish the project within my Temp folder….  Msbuild will build each project, and publish each project copying the Bin / Views / and configs in the Temp folder keeping your solution structure…

Once you have the temp folder, you can then Zip the package and use to deploy on your Sitecore instance…