Skip to content

Commit f8ccedd

Browse files
authored
fix(sdk): exclude template folders from default compilation (#36)
Template files contain VS template placeholders ($safeprojectname$, etc.) that are not valid C# and should not be compiled as part of the extension. This adds ProjectTemplates/** and ItemTemplates/** to DefaultItemExcludes.
1 parent be2dde3 commit f8ccedd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.Templates.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
<!-- Default folders for template discovery -->
1717
<VsixProjectTemplatesFolder Condition="'$(VsixProjectTemplatesFolder)' == ''">ProjectTemplates</VsixProjectTemplatesFolder>
1818
<VsixItemTemplatesFolder Condition="'$(VsixItemTemplatesFolder)' == ''">ItemTemplates</VsixItemTemplatesFolder>
19+
20+
<!--
21+
Exclude template folders from default compilation.
22+
Template files contain VS template placeholders ($safeprojectname$, etc.)
23+
that are not valid C# and should not be compiled as part of the extension.
24+
-->
25+
<DefaultItemExcludes>$(DefaultItemExcludes);$(VsixProjectTemplatesFolder)\**;$(VsixItemTemplatesFolder)\**</DefaultItemExcludes>
1926
</PropertyGroup>
2027

2128
<!--

0 commit comments

Comments
 (0)