Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who sets packageid? Also, are we renaming the folder name to netcoreapp3.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PackageId is set by the SDK. So this should result in

<None Include="targets\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets" Pack="true" PackagePath="build\netcoreapp3.1\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets" />

<None Include="targets\$(PackageId).targets" Pack="true" PackagePath="buildTransitive\$(DefaultNetCoreTargetFramework)\$(PackageId).targets" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -21,4 +20,6 @@
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
</ItemGroup>

<Import Project="..\..\..\Mvc.Razor.RuntimeCompilation\src\targets\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No $(SolutionRoot)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehh, unless something like helix requires it


</Project>
3 changes: 1 addition & 2 deletions src/ProjectTemplates/test/MvcTemplateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ public MvcTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper o
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);
Expand Down