Specify AddRazorSupportForMvc in Blazor templates

VS 16.1 tooling does not support RazorConfigurations with no extensions
Working around this by treating Blazor templates as using MVC configuration
until we can resolve the issue in tooling

Workaround for https://github.com/aspnet/AspNetCore/issues/9119
This commit is contained in:
Pranav K 2019-04-05 15:51:53 -07:00
parent 728110ec9e
commit d1eeb55139
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\..\targets\All.props" />
</Project>
<PropertyGroup>
<!-- Removing this tracked via https://github.com/aspnet/AspNetCore/issues/9126 -->
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
</Project>

View File

@ -9,6 +9,7 @@
</RestoreAdditionalProjectSources>
<LangVersion>7.3</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<ItemGroup>

View File

@ -6,7 +6,7 @@
<RazorLangVersion Condition="'$(SupportPagesAndViews)' != 'True'">3.0</RazorLangVersion>
<AddRazorSupportForMvc Condition="'$(SupportPagesAndViews)' == 'True'">true</AddRazorSupportForMvc>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.RazorClassLibrary1</RootNamespace>
<AddRazorSupportForMvc Condition="'$(SupportPagesAndViews)' == 'True'">true</AddRazorSupportForMvc>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<ItemGroup Condition="'$(SupportPagesAndViews)' == 'True'">