\n\nCommit migrated from f6dd261211
This commit is contained in:
Pranav K 2019-04-04 06:05:46 -07:00
parent 37275e5fd5
commit 5b71a24b4f
4 changed files with 5 additions and 7 deletions

View File

@ -30,12 +30,10 @@ Copyright (c) .NET Foundation. All rights reserved.
<!--
Resolve MVC specific configuration depending on the presence of MVC specific Razor files.
-->
<Target Name="_ResolveMvcSpecificRazorConfiguration"
<Target Name="_ResolveMvcAssemblyAttributes"
DependsOnTargets="ResolveRazorGenerateInputs"
Condition="'$(Language)' == 'C#' AND '$(AddRazorSupportForMvc)' == 'true'">
<Message Text="@(RazorGenerateWithTargetPath)" Importance="High" />
<PropertyGroup Condition="'@(RazorGenerate->Count())' != '0'">
<!--
MVC uses a ProvideApplicationPartFactoryAttribute on the generated assembly to load compiled views from assembly. Set this to false, to prevent generating this attribute.

View File

@ -34,7 +34,7 @@ Copyright (c) .NET Foundation. All rights reserved.
</GenerateRazorTargetAssemblyInfoDependsOn>
<GenerateRazorTargetAssemblyInfoDependsOn Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true'">
_ResolveMvcSpecificRazorConfiguration;
_ResolveMvcAssemblyAttributes;
$(GenerateRazorTargetAssemblyInfoDependsOn)
</GenerateRazorTargetAssemblyInfoDependsOn>
</PropertyGroup>
@ -187,7 +187,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- In 3.0 or later, we need to invoke a target to determine MVC specific configuration. -->
<_GenerateRazorAssemblyInfoDependsOn Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true'">
_ResolveMvcSpecificRazorConfiguration;
_ResolveMvcAssemblyAttributes;
$(_GenerateRazorAssemblyInfoDependsOn);
</_GenerateRazorAssemblyInfoDependsOn>
</PropertyGroup>

View File

@ -444,7 +444,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
[Fact]
[InitializeTestProject("SimpleMvc")]
public async Task Build_GeneratesHostingAttributesByDefault()
public async Task Build_GeneratesHostingAttributes_WhenGenerateRazorHostingAssemblyInfoIsSet()
{
var razorAssemblyInfo = Path.Combine(IntermediateOutputPath, "SimpleMvc.AssemblyInfo.cs");
var result = await DotnetMSBuild("Build", "/p:GenerateRazorHostingAssemblyInfo=false");

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{
}
[Fact]
[Fact]
[InitializeTestProject("SimpleMvc")]
public async Task Build_DoesNotAddHostingMetadata_ByDefault()
{