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

View File

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

View File

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