Home

Awesome

Sitecore Helix Module & Solution Templates for VisualStudio

<img alt="Sitecore Helix Visual Studio Extensions Logo" src="Logo/vs.helix.2.png" width="200">

Visual Studio extension that accelerates creating new Visual Studio solutions and projects that follow the conventions described in Sitecore Helix.

Install extension from Visual Studio Marketplace

For reporting issues with the example templates - or if you'd like to contribute your own templates - use this repository

Change log

2021-12-13 v21.12.1314 (released)


2020-10-25 v20.10.2517 (released)


2020-06-07 v20.06.0719 (not released)


2020-02-18 v20.02.1722 (not released)


2020-01-12 v0.9.9.20


2019-04-30 v0.9.9.14


2019-04-26 v0.9.9.12


2019-04-10 v0.9.9.10


Please submit bugs, ideas and enhancement suggestions using Issues

Installation

The extension can be installed via Visual Studio Extensions and Updates

Visual Studio 2015, 2017, 2019 and 2022 are supported but the built-in module templates does not support being loaded in Visual Studio 2015. You will need to make your own templates or upgrade VS.

Important Note: You need to run Visual Studio as administrator to use this extension.
Guide to always start Visual Studio as administrator Right click a shortcut to Visual Studio

When the extension has been installed a new project template is available under Visual C# templates.

In Visual Studio 2019 / 2022 - Search for Helix to easily find the templates.

VS 2019 / 2022 - Create new project dialog

Using the template for the first time you will be asked to select a root directory for storing your Helix templates. This directory can be changed at any time from the Settings dialog. When an empty root folder is selected you will be asked if you want to install the built-in templates.

Install default example templates

New: To keep your module templates under Source control you can add a solution-scope templates folder in your repo root. The extension will automatically try to detect if a folder exist and write a .helixtemplates configuration file with the relative folder path.

Relative module templates folder

New: The extension will ask if you like to create a solution-scope module templates folder if none exist already. You can also manually create the folder or use the global-scope templates folder for modules.

Module template folder auto-create

When selecting File > New Project the extension will presume that you are creating a new solution and filter the available templates so only solution templates are shown.

Creating a new module

To add a new module click Add New project in the solution explorer. Note that you do not have to right-click the location you want the module placed. It is the template folder structure that dictates where the module is placed.

Creating a new module

Always select the solution root folder when creating new modules. The template folder structure ensures that the module is placed correctly and will generate any missing folders.

Debugging Templates

You can use the new trace window to debug your templates.

Creating a new module

If a template is not being loaded, open the trace window and then reload the template selection combo box by opening and closing the settings dialog. Note, the trace window is always top-most and has to be closed manually after creation is done.

Footnotes

The included templates are only meant as examples - they can of course be used as is but please tailor the templates to match your customer solutions. Don't forget to think.

All code is released as open source under the ISC license.
Please remember to include the original license in any derivatives.
Anders Laub - contact@laubplusco.net