diff options
author | Pranav K <prkrishn@hotmail.com> | 2019-06-03 17:48:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 17:48:23 +0300 |
commit | 1ed5febf93033214d649ab055ecfd2c143c91bf2 (patch) | |
tree | e331a249c1a15ff2176517e51de85b8dae0b8450 | |
parent | 4646c4a5e4412dbff6e40ade887792241f5a2c94 (diff) | |
parent | 807cbf5dd3526b8af3e3f4da1d498ef9f6c24cae (diff) |
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
-rw-r--r-- | src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp3.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp3.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp3.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets index 506e12c735..f12a646391 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp3.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp3.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets @@ -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> |