parent
37275e5fd5
commit
5b71a24b4f
|
|
@ -30,12 +30,10 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
<!--
|
<!--
|
||||||
Resolve MVC specific configuration depending on the presence of MVC specific Razor files.
|
Resolve MVC specific configuration depending on the presence of MVC specific Razor files.
|
||||||
-->
|
-->
|
||||||
<Target Name="_ResolveMvcSpecificRazorConfiguration"
|
<Target Name="_ResolveMvcAssemblyAttributes"
|
||||||
DependsOnTargets="ResolveRazorGenerateInputs"
|
DependsOnTargets="ResolveRazorGenerateInputs"
|
||||||
Condition="'$(Language)' == 'C#' AND '$(AddRazorSupportForMvc)' == 'true'">
|
Condition="'$(Language)' == 'C#' AND '$(AddRazorSupportForMvc)' == 'true'">
|
||||||
|
|
||||||
<Message Text="@(RazorGenerateWithTargetPath)" Importance="High" />
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'@(RazorGenerate->Count())' != '0'">
|
<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.
|
MVC uses a ProvideApplicationPartFactoryAttribute on the generated assembly to load compiled views from assembly. Set this to false, to prevent generating this attribute.
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
</GenerateRazorTargetAssemblyInfoDependsOn>
|
</GenerateRazorTargetAssemblyInfoDependsOn>
|
||||||
|
|
||||||
<GenerateRazorTargetAssemblyInfoDependsOn Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true'">
|
<GenerateRazorTargetAssemblyInfoDependsOn Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true'">
|
||||||
_ResolveMvcSpecificRazorConfiguration;
|
_ResolveMvcAssemblyAttributes;
|
||||||
$(GenerateRazorTargetAssemblyInfoDependsOn)
|
$(GenerateRazorTargetAssemblyInfoDependsOn)
|
||||||
</GenerateRazorTargetAssemblyInfoDependsOn>
|
</GenerateRazorTargetAssemblyInfoDependsOn>
|
||||||
</PropertyGroup>
|
</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. -->
|
<!-- In 3.0 or later, we need to invoke a target to determine MVC specific configuration. -->
|
||||||
<_GenerateRazorAssemblyInfoDependsOn Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true'">
|
<_GenerateRazorAssemblyInfoDependsOn Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true'">
|
||||||
_ResolveMvcSpecificRazorConfiguration;
|
_ResolveMvcAssemblyAttributes;
|
||||||
$(_GenerateRazorAssemblyInfoDependsOn);
|
$(_GenerateRazorAssemblyInfoDependsOn);
|
||||||
</_GenerateRazorAssemblyInfoDependsOn>
|
</_GenerateRazorAssemblyInfoDependsOn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
[InitializeTestProject("SimpleMvc")]
|
[InitializeTestProject("SimpleMvc")]
|
||||||
public async Task Build_GeneratesHostingAttributesByDefault()
|
public async Task Build_GeneratesHostingAttributes_WhenGenerateRazorHostingAssemblyInfoIsSet()
|
||||||
{
|
{
|
||||||
var razorAssemblyInfo = Path.Combine(IntermediateOutputPath, "SimpleMvc.AssemblyInfo.cs");
|
var razorAssemblyInfo = Path.Combine(IntermediateOutputPath, "SimpleMvc.AssemblyInfo.cs");
|
||||||
var result = await DotnetMSBuild("Build", "/p:GenerateRazorHostingAssemblyInfo=false");
|
var result = await DotnetMSBuild("Build", "/p:GenerateRazorHostingAssemblyInfo=false");
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
[InitializeTestProject("SimpleMvc")]
|
[InitializeTestProject("SimpleMvc")]
|
||||||
public async Task Build_DoesNotAddHostingMetadata_ByDefault()
|
public async Task Build_DoesNotAddHostingMetadata_ByDefault()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue