Exclude templates from Sitecore TDS Code Generation

550 Views Asked by At

Is there a clean way to exclude Sitecore templates from the TDS code generation? We have to add all Sitecore templates to TDS because we exchange them with other developer.

2

There are 2 best solutions below

0
On

You can set the Property to not generate classes for an item (and sub-items).

TDS Do Not Generate

An alternative way of achieving this is a split out your solution into 2 separate projects, one for the templates that need code generation and one for those without. You can then use the Multi-project Properties to bundle all the items together into a single update package.

0
On

From what I recall, you will usually trigger code generation for a section of the tree by assigning a code generation template to the item in the TDS project.

If you are assigning your code generation TT at the top level of the project, this will include all templates. If you would like to exclude, just move your code generation template assignment down a level and make sure you do not assign a code generation template to the "Templates" item in the TDS project. This should ensure code generation does not run for those items.