Allow UpToDateReloadFileTypes to be modified by packages

\n\nCommit migrated from 81c2e03bc3
This commit is contained in:
Pranav K 2019-05-31 15:13:57 -07:00
parent 1c27d78420
commit 5c59b78415
3 changed files with 17 additions and 1 deletions

View File

@ -17,7 +17,7 @@ Copyright (c) .NET Foundation. All rights reserved.
Defines the list of file extensions that VS will monitor to reload the application.
We'll only define these for C# projects targeting RazorLangVersion 3.0 or later, and let VS use defaults in other cases.
-->
<UpToDateReloadFileTypes Condition="'$(Language)'=='C#' AND '$(_Targeting30OrNewerRazorLangVersion)' == 'true'">$(UpToDateReloadFileTypes);.cs;.razor;.resx;.cshtml</UpToDateReloadFileTypes>
<UpToDateReloadFileTypes Condition="'$(Language)'=='C#' AND '$(_Targeting30OrNewerRazorLangVersion)' == 'true' AND '$(RazorUpToDateReloadFileTypes)' == ''">$(UpToDateReloadFileTypes);$(RazorUpToDateReloadFileTypes)</UpToDateReloadFileTypes>
</PropertyGroup>
<ItemGroup>

View File

@ -65,6 +65,12 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- Determines if the refs folder is produced as part of build \ publish -->
<PreserveCompilationReferences>false</PreserveCompilationReferences>
<!--
List of file extensions that will cause VS to restart the application when RazorSDK is effective.
This property affects C# projects targeting 3.0 or later.
-->
<RazorUpToDateReloadFileTypes>.cs;.razor;.resx;.cshtml</RazorUpToDateReloadFileTypes>
</PropertyGroup>
<ItemGroup Condition="'$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true'">

View File

@ -846,6 +846,16 @@ Copyright (c) .NET Foundation. All rights reserved.
<Import Project="$(RazorDesignTimeTargets)" />
<PropertyGroup>
<!--
Defines the list of file extensions that VS will monitor to reload the application.
We'll only define these for C# projects targeting RazorLangVersion 3.0 or later, and let VS use defaults in other cases.
This property can be removed after the next insertion in to VS.
-->
<UpToDateReloadFileTypes Condition="'$(Language)'=='C#' AND '$(_Targeting30OrNewerRazorLangVersion)' == 'true' AND '$(RazorUpToDateReloadFileTypes)' == ''">$(RazorUpToDateReloadFileTypes)</UpToDateReloadFileTypes>
</PropertyGroup>
<!--
This is a hook to import a set of targets after the Razor targets. By default this is unused.
-->