This code is an extension of the files written by Marc Duiker, so all credits to him :)
His blog post can be found here https://blog.marcduiker.nl/2016/12/28/hands-on-with-sitecore-helix-using-powershell-add-module.html and make sure to read it in order to know how to use and install this module.
The installation and usage completely remain the same. Compared to his files, there are couple of changes:
add-helixmodule.ps1- added support for *.scproj files
add-helix-module-configuration.json– added support for *.scproj files
- template examples for TDS and VS projects
All files can be fount on Git: https://github.com/unaverhoeven/TDS-Helix
Example template for TDS project:
Example template for VS project:
The above examples are for guidance purposes only. I tried to make it as generic as possible but, we all use different versions of VS, TDS, different NuGet packages, etc. The above TDS example uses TDS 5.7 version installed with a NuGet package. Your version may be different or perhaps you have a folder where your references are. The same goes for VS project, different versions, dlls, etc.
Template files that you need to modify are:
For TDS project
For VS project
Note: if you are not using NuGet for TDS, you do not need
package.config. Configuration is fully explained on Marc's blog.
Now, these examples should be modified according to your project needs. They are not the holy grail, but they should give you enough knowledge to modify or setup your own ones.
Post Steps for TDS project
- Refer TDS project to the VS project
- Enable code generation, etc
How to run the module
The important thing here is that your solution follows folder structure:
PowerShell script depends on it.
- Open Packager Manager Console.
- For adding a Feature use
- For adding a Foundation use
This is how it should look in Package Manager Console:
and in Solution tree