Skip to content

Commit

Permalink
Add WebForms files types as Content - Closes #24
Browse files Browse the repository at this point in the history
Property EnableWebFormsDefaultItems can be used to control this behaviour
  • Loading branch information
CZEMacLeod committed Sep 23, 2021
1 parent 3fbb47d commit def21c2
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,29 @@
<DefaultItemExcludes>$(DefaultItemExcludes);**\jspm_packages\**;jspm_packages\**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\bower_components\**;bower_components\**</DefaultItemExcludes>
</PropertyGroup>

<!-- EnableWebFormsDefaultItems follows EnableDefaultItems and adds WebForms items as content - Closes #24 -->
<PropertyGroup>
<EnableWebFormsDefaultItems Condition="'$(EnableWebFormsDefaultItems)'==''">$(EnableDefaultItems)</EnableWebFormsDefaultItems>
</PropertyGroup>

<!-- Exclude WebForms items from default items -->
<PropertyGroup Condition="'$(EnableWebFormsDefaultItems)'=='true'">
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.asax;*.asax</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.ascx;*.ascx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.ashx;*.ashx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.asmx;*.asmx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.aspx;*.aspx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.master;*.master</DefaultItemExcludes>
</PropertyGroup>

<!-- Include WebForms items as content -->
<ItemGroup Condition="'$(EnableWebFormsDefaultItems)'=='true'">
<Content Include="**\*.asax" />
<Content Include="**\*.ascx" />
<Content Include="**\*.ashx" />
<Content Include="**\*.asmx" />
<Content Include="**\*.aspx" />
<Content Include="**\*.master" />
</ItemGroup>
</Project>

0 comments on commit def21c2

Please sign in to comment.