From 28e18c30587a3dc02a4c961fcd9563df749f8e0a Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 25 Aug 2020 15:25:29 -0700 Subject: [PATCH 1/5] Allow dotnet watch to refresh on changes to .razor files in referenced projects dotnet-watch expects full paths to files to watch in all added items. For files in the current project, this happens to work. However this does not work very well for files in referenced projects. Using the FullPath metadata does not work during global evaluation, but we're able to do this in a target. This change adds extensibility to the dotnet-watch tool that allows calling a target as part of "watch" evaluation. Fixes https://github.com/dotnet/aspnetcore/issues/22219 --- .../Sdk.Razor.CurrentVersion.props | 5 ++ .../Sdk.Razor.CurrentVersion.targets | 14 +++--- .../src/assets/DotNetWatch.targets | 1 + .../test/MsBuildFileSetFactoryTest.cs | 48 +++++++++++++++++++ .../test/TestProjects/KitchenSink/.gitignore | 1 + .../test/dotnet-watch.Tests.csproj | 7 ++- 6 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 src/Tools/dotnet-watch/test/TestProjects/KitchenSink/.gitignore 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 3bc7a24d9eed..795c769a0681 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 @@ -78,6 +78,11 @@ Copyright (c) .NET Foundation. All rights reserved. This property affects C# projects targeting 3.0 or later. --> .cs;.razor;.resx;.cshtml + + + $(CustomCollectWatchItems);_RazorSdkCustomCollectWatchItems 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 7930682638c7..543af9bf639f 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 @@ -327,12 +327,6 @@ Copyright (c) .NET Foundation. All rights reserved. --> - - - - - - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa - + https://github.com/dotnet/runtime - 1dfd9438149f74ae11918a7b0709b8d58c61443f + 10068f4363ab3681de9ca3bb8a88428c74ff37fa https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 4cd8dc2f0d54..f80bd89cf373 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -64,85 +64,85 @@ 3.8.0-2.20407.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 - 5.0.0-rc.1.20428.3 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 + 5.0.0-rc.1.20428.9 - 5.0.0-rc.1.20428.3 + 5.0.0-rc.1.20428.9 3.2.0 - 5.0.0-rc.1.20428.8 - 5.0.0-rc.1.20428.8 - 5.0.0-rc.1.20428.8 - 5.0.0-rc.1.20428.8 - 5.0.0-rc.1.20428.8 - 5.0.0-rc.1.20428.8 - 5.0.0-rc.1.20428.8 - 5.0.0-rc.1.20428.8 + 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.10 3.2.0 - 5.0.0-rc.1.20428.10 - 5.0.0-rc.1.20428.10 - 5.0.0-rc.1.20428.10 - 5.0.0-rc.1.20428.10 - 5.0.0-rc.1.20428.10 - 5.0.0-rc.1.20428.10 - 5.0.0-rc.1.20428.10 - 5.0.0-rc.1.20428.10 + 5.0.0-rc.1.20428.12 + 5.0.0-rc.1.20428.12 + 5.0.0-rc.1.20428.12 + 5.0.0-rc.1.20428.12 + 5.0.0-rc.1.20428.12 + 5.0.0-rc.1.20428.12 + 5.0.0-rc.1.20428.12 + 5.0.0-rc.1.20428.12