Use a property to allow specifying component globbing pattern

Workaround for https://github.com/aspnet/AspNetCore/issues/6500
\n\nCommit migrated from cee0223732
This commit is contained in:
Pranav K 2019-01-14 10:07:08 -08:00
parent 56695d17c9
commit 148bc99cce
3 changed files with 4 additions and 9 deletions

View File

@ -369,7 +369,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<ItemGroup Condition="'$(EnableDefaultRazorGenerateItems)'=='true'">
<RazorGenerate
Include="@(Content)"
Exclude="@(RazorComponent)"
Exclude="$(_RazorComponentInclude)"
Condition="'%(Content.Extension)'=='.cshtml'" />
</ItemGroup>
@ -406,6 +406,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<ItemGroup Condition="'$(EnableDefaultRazorComponentItems)'=='true'">
<RazorComponent Include="@(Content)" Condition="'%(Content.Extension)'=='.razor'" />
<RazorComponent Include="$(_RazorComponentInclude)" />
</ItemGroup>
</Target>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
<_RazorComponentInclude>**\*.cshtml</_RazorComponentInclude>
</PropertyGroup>
<PropertyGroup>
@ -27,10 +28,6 @@
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
</ItemGroup>
<ItemGroup>
<RazorComponent Include="**/*.cshtml" />
</ItemGroup>
<ItemGroup>
<ProjectCapability Include="DotNetCoreRazorConfiguration" />
</ItemGroup>

View File

@ -3,6 +3,7 @@
<PropertyGroup>
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<_RazorComponentInclude>Components\**\*.cshtml</_RazorComponentInclude>
</PropertyGroup>
<PropertyGroup>
@ -29,10 +30,6 @@
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
</ItemGroup>
<ItemGroup>
<RazorComponent Include="Components/**/*.cshtml" />
</ItemGroup>
<!-- Test Placeholder -->
</Project>