From c9ed74d84ae69dd376a0c61852abf980308b356f Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 22 Jul 2019 09:16:09 -0700 Subject: [PATCH] Correctly set UpToDateReloadFileTypes (dotnet/aspnetcore-tooling#858) * Correctly set UpToDateReloadFileTypes UpToDateReloadFileTypes was incorrectly set in the preview6 DesignTime targets and this was worked around in the SDK's targets. Unfortunately the updated copy of DesignTime targets (current as of 7/13) also has a bug. This fixes the issue and adds some tests to verify we're correct with the past, present & future. Fixes https://github.com/aspnet/AspNetCore/issues/11873 \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/525d0c1ad360434a833356facb8687e80cd4351f --- ...Microsoft.NET.Sdk.Razor.DesignTime.targets | 20 +++---- .../Sdk.Razor.CurrentVersion.targets | 4 +- .../BuildIntrospectionTest.cs | 52 +++++++++++++++++++ .../RazorTest.Introspection.targets | 4 ++ 4 files changed, 68 insertions(+), 12 deletions(-) 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 f50984d5f1..2bf7ada2df 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);$(RazorUpToDateReloadFileTypes) + $(UpToDateReloadFileTypes);$(RazorUpToDateReloadFileTypes) @@ -42,7 +42,7 @@ Copyright (c) .NET Foundation. All rights reserved. - @@ -84,9 +84,9 @@ Copyright (c) .NET Foundation. All rights reserved. - @@ -94,9 +94,9 @@ Copyright (c) .NET Foundation. All rights reserved. Using DependsOnTargets here because real dependencies of this target aren't defined in a downlevel (pre-3.0) SDK. --> - @@ -107,8 +107,8 @@ Copyright (c) .NET Foundation. All rights reserved. Called by the project system to update generated declaration files --> - 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 14be3fdf58..e001d5f5da 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 @@ -865,14 +865,14 @@ Copyright (c) .NET Foundation. All rights reserved. - + - $(RazorUpToDateReloadFileTypes) + $(RazorUpToDateReloadFileTypes)