Application restarts on changes to Razor files (#10716)

* Remove Razor versioning number from DotNetWatch.targets

Application restarts on changes to Razor files

* .cshtml and .razor files cause dotnet-watch to reload by default
* .cshtml files do not cause VS or dotnet-watch to reload when using RuntimeCompilation

Fixes https://github.com/aspnet/AspNetCore/issues/9644
This commit is contained in:
Pranav K 2019-06-03 07:48:23 -07:00 committed by GitHub
commit 1ed5febf93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -5,5 +5,10 @@
<!-- Generate hosting attributes during build time compilation to support runtime compilation -->
<GenerateRazorHostingAssemblyInfo Condition="'$(GenerateRazorHostingAssemblyInfo)'==''">true</GenerateRazorHostingAssemblyInfo>
<!-- Prevent VS from restarting the application when cshtml files change since this package handles it -->
<RazorUpToDateReloadFileTypes>$(RazorUpToDateReloadFileTypes.Replace('.cshtml', ''))</RazorUpToDateReloadFileTypes>
<AddCshtmlFilesToDotNetWatchList>false</AddCshtmlFilesToDotNetWatchList>
</PropertyGroup>
</Project>