From 96db556687a08b65982abbfc76256e7312ffe994 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 10 May 2022 22:38:39 +0200 Subject: Update generators.targets (#68860) * Update generators.targets Changes: - Improve perf of LibraryImportGenerator condition and simplify it - Use the same msbuild code styling as in other projects in src/libraries - Update comments that were outdated - Remove the item conditions for the regex source generator which doesn't work well with the CPS (common project system) inside VS. - Remove unnecessary property * Update eng/generators.targets Co-authored-by: Jeremy Barton * Update generators.targets * Update generators.targets Co-authored-by: Jeremy Barton --- eng/generators.targets | 91 ++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 51 deletions(-) (limited to 'eng/generators.targets') diff --git a/eng/generators.targets b/eng/generators.targets index 78afaac2569..69c3c12cbb4 100644 --- a/eng/generators.targets +++ b/eng/generators.targets @@ -1,68 +1,57 @@ - - true - true + true + - + Condition="'$(EnableLibraryImportGenerator)' == '' and + '$(IsSourceProject)' == 'true' and + '$(MSBuildProjectExtension)' == '.csproj' and + ( + '$(TargetFrameworkMoniker)' != '$(NetCoreAppCurrentTargetFrameworkMoniker)' or + '$(DisableImplicitFrameworkReferences)' != 'true' or + ( + '@(Reference)' != '' and + @(Reference->AnyHaveMetadataValue('Identity', 'System.Runtime.InteropServices')) + ) or + ( + '@(ProjectReference)' != '' and + @(ProjectReference->AnyHaveMetadataValue('Identity', '$(CoreLibProject)')) + ) + )" /> - - - - + + + - - - - - - - - + + + - - - + + + - + -- cgit v1.2.3