Ensure Microsoft.AspNetCore.Razor.RuntimeCompilation has the right build targets (#14863)

* Include build and build transitive folders in RuntimeCompilation package
* Use a different folder name to allow GitHub indexing. See https://github.com/aspnet/AspNetCore/issues/14846
* Add a test to verify transitive build targets work

Fixes https://github.com/aspnet/AspNetCore/issues/14813
Fixes https://github.com/aspnet/AspNetCore/issues/12768
This commit is contained in:
Pranav K 2019-10-11 13:53:16 -07:00 committed by GitHub
parent 08eafcddbd
commit 6dee2f548a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -23,6 +23,7 @@
</ItemGroup>
<ItemGroup>
<None Include="build\$(DefaultNetCoreTargetFramework)\*" Pack="true" PackagePath="build\$(DefaultNetCoreTargetFramework)" />
<None Include="targets\$(PackageId).targets" Pack="true" PackagePath="build\$(DefaultNetCoreTargetFramework)\$(PackageId).targets" />
<None Include="targets\$(PackageId).targets" Pack="true" PackagePath="buildTransitive\$(DefaultNetCoreTargetFramework)\$(PackageId).targets" />
</ItemGroup>
</Project>

View File

@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<DefineConstants>$(DefineConstants)</DefineConstants>
<!-- We have tests that test runtime view compilation. -->
<RazorCompileOnBuild>false</RazorCompileOnBuild>
<IsTestAssetProject>true</IsTestAssetProject>
@ -21,4 +20,6 @@
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
</ItemGroup>
<Import Project="..\..\..\Mvc.Razor.RuntimeCompilation\src\targets\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets" />
</Project>

View File

@ -25,13 +25,12 @@ namespace Templates.Test
public ProjectFactoryFixture ProjectFactory { get; }
public ITestOutputHelper Output { get; }
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/14022")]
[Fact]
public async Task MvcTemplate_NoAuthFSharp() => await MvcTemplateCore(languageOverride: "F#");
[Fact]
public async Task MvcTemplate_NoAuthCSharp() => await MvcTemplateCore(languageOverride: null);
private async Task MvcTemplateCore(string languageOverride)
{
Project = await ProjectFactory.GetOrCreateProject("mvcnoauth" + (languageOverride == "F#" ? "fsharp" : "csharp"), Output);