From 49f8ae28cff35893f88787e08191c90a67f4e561 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 10 Oct 2019 09:43:59 -0700 Subject: [PATCH] Add support for using a 3.0 SDK on VS 16.4. - The 3.0 SDK adds RazorDeclaration files to the compile list if they exist. If a user builds in VS and then does a project level operation (adding a property group or item group to their project file) a design time build will trigger for unrelated reasons and declaration files will be included as part of the C# compilation resulting in duplicate member errors. This change ensures that even if declaration files are added we then remove them to ensure we avoid those declaration additions. - One unfortunate aspect of this change is that declarations are added to the compile list for a brief moment resulting in errors and then are instantly removed in some situations. I say "some situations" because when this happens it is highly dependent on how / when the project system decides to perform a design time build. aspnet/AspNetCoredotnet/aspnetcore-tooling#14646 \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/b64c9317c42b6283dd28313e363012f7e6b56166 --- .../Microsoft.NET.Sdk.Razor.DesignTime.targets | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 0b27cfce4a..4d8e0b5c4d 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 @@ -47,6 +47,17 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + + + +