From 5c59b7841584abdd5ad0c49fa7fd0bd849ae2486 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 31 May 2019 15:13:57 -0700 Subject: [PATCH 1/2] Allow UpToDateReloadFileTypes to be modified by packages \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/81c2e03bc35bad5c2d8f33fc367106cc817e0cbc --- .../Microsoft.NET.Sdk.Razor.DesignTime.targets | 2 +- .../netstandard2.0/Sdk.Razor.CurrentVersion.props | 6 ++++++ .../netstandard2.0/Sdk.Razor.CurrentVersion.targets | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets index a9a000aad3..f50984d5f1 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets +++ b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets @@ -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);.cs;.razor;.resx;.cshtml + $(UpToDateReloadFileTypes);$(RazorUpToDateReloadFileTypes) diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.props b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.props index 91dd8fc557..60cc8fecc1 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.props +++ b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.props @@ -65,6 +65,12 @@ Copyright (c) .NET Foundation. All rights reserved. false + + + .cs;.razor;.resx;.cshtml diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets index 2a39eddb7a..12fce1cbdf 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets +++ b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets @@ -846,6 +846,16 @@ Copyright (c) .NET Foundation. All rights reserved. + + + $(RazorUpToDateReloadFileTypes) + + From 9d8e9fb3a7c2fac5e5b7904e93f1a4601e6aa368 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Sat, 1 Jun 2019 08:10:10 -0700 Subject: [PATCH 2/2] Allow file watching with dotnet-watch \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/42d3a88fed29364a261750a99b03cae7a22ded70 --- .../Sdk.Razor.CurrentVersion.targets | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets index 12fce1cbdf..880e079e61 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets +++ b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets @@ -15,7 +15,7 @@ Copyright (c) .NET Foundation. All rights reserved. true - @@ -223,9 +223,9 @@ Copyright (c) .NET Foundation. All rights reserved. false true - $([MSBuild]::EnsureTrailingSlash('$(MvcRazorOutputPath)')) @@ -233,7 +233,7 @@ Copyright (c) .NET Foundation. All rights reserved. $(MvcRazorEmbedViewSources) false @@ -321,6 +321,12 @@ Copyright (c) .NET Foundation. All rights reserved. --> + + + + + @@ -411,8 +417,8 @@ Copyright (c) .NET Foundation. All rights reserved. Gets assembly attributes in support for Razor runtime code generation. This is a set of standard metadata attributes (defined in Microsoft.AspNetCore.Razor.Runtime) that capture the build-time Razor configuration of an application to be used at runtime. - - This allows the project file to act as the source of truth for the applicable Razor configuration regardless + + This allows the project file to act as the source of truth for the applicable Razor configuration regardless of how Razor is used. The SDK expects configurations that use runtime compilation to set $(GenerateRazorHostingAssemblyInfo) to true, @@ -469,13 +475,13 @@ Copyright (c) .NET Foundation. All rights reserved. @@ -555,7 +561,7 @@ Copyright (c) .NET Foundation. All rights reserved. - - @@ -698,7 +704,7 @@ Copyright (c) .NET Foundation. All rights reserved. DependsOnTargets="ResolveRazorGenerateInputs" Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true'"> - @@ -773,7 +779,7 @@ Copyright (c) .NET Foundation. All rights reserved.