From 4d82932722b56924598708f991961a75e5a90b36 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 10 Aug 2021 07:19:06 +0200 Subject: Automatically generate .NETStandard compat errors (#57057) * Automatically generate .NETStandard compat errors Before this change, a project had to explicitly add a NETStandardCompatError item to declare that a given tfm range shouldn't be supported when packaging. Automate this logic so that projects don't need to specify the item themselves anymore. Instead condition the NETStandardCompatError target calcuation logic on the existence of both a .NETStandard and a .NETCoreApp tfm. * Update Directory.Build.targets * Update packaging.targets * Update eng/packaging.targets Co-authored-by: Santiago Fernandez Madero Co-authored-by: Santiago Fernandez Madero --- Directory.Build.targets | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) (limited to 'Directory.Build.targets') diff --git a/Directory.Build.targets b/Directory.Build.targets index 532b24c473a..f8e663fdc26 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,4 +1,4 @@ - + $(PackageDescription) - AddNETStandardCompatErrorFileForPackaging;$(GenerateNuspecDependsOn) + ErrorForMissingPackageDescription;$(GenerateNuspecDependsOn) + Condition="'$(PackageDescription)' == ''"> @@ -72,40 +72,6 @@ - - - - <_NETStandardCompatErrorFilePath>$(BaseIntermediateOutputPath)netstandardcompaterrors\%(NETStandardCompatError.Identity)\$(PackageId).targets - <_NETStandardCompatErrorFileTarget>NETStandardCompatError_$(PackageId.Replace('.', '_'))_$([System.String]::new('%(NETStandardCompatError.Supported)').Replace('.', '_')) - <_NETStandardCompatErrorFileContent> - - - - -]]> - - - - - - - - - - - -