From 5c5418ccaecdb1bc66f1c945698223ad4c5b08d6 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 10 Aug 2021 08:35:07 +0200 Subject: [PATCH 1/2] Fix analyzer and docs file packaging This commit fixes analyzers which were dropped from the package during the clean-up of pkgprojs and missing documentation files. 1. Analyzers were dropped from the package because the BeforePack hook wasn't respected. This happens when the NuGet Pack nuget package is referenced which then gets imported before the packaging.targets file. The BeforePack property needs to be set in a props file if NuGet's targets file isn't used from the SDK but from its package. 2. Documentation files were dropped as the DefaultAllowedOutputExtensionsInPackageBuildOutputFolder property didn't include the .xml extension. --- eng/packaging.props | 17 +++-------------- eng/packaging.targets | 14 +++++++++++++- src/libraries/Directory.Build.props | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/eng/packaging.props b/eng/packaging.props index 8c4d987de58fc7..dcaf0ba043366b 100644 --- a/eng/packaging.props +++ b/eng/packaging.props @@ -1,20 +1,9 @@ - .dll;.exe;.winmd;.json;.pri; + + AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack) - - - - - - - - - - diff --git a/eng/packaging.targets b/eng/packaging.targets index 4da978473768b6..ecd2363fd2bef1 100644 --- a/eng/packaging.targets +++ b/eng/packaging.targets @@ -12,7 +12,6 @@ true $(MSBuildThisFileDirectory)useSharedDesignerContext.txt - AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack) true @@ -28,6 +27,19 @@ Condition="'$(DisablePackageBaselineValidation)' != 'true' and '$(PackageValidationBaselinePath)' == '' and '$(PackageValidationBaselineVersion)' != ''" /> + + + + + + + + + + <_FrameworkAssemblyReferences Include="$(MSBuildProjectName)" TargetFramework="net461" /> diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index 23421981fbadfe..2e52a7ca3dfab3 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -60,7 +60,7 @@ - + From e00470a16e29d8ba62dd16560ec6c4ad6513902f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 10 Aug 2021 11:17:49 +0200 Subject: [PATCH 2/2] Don't overbuild runtime native IO packages --- src/libraries/System.IO.Ports/src/System.IO.Ports.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj index 024a193525f4a1..e017d4db8bf40a 100644 --- a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj +++ b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj @@ -153,10 +153,10 @@ System.IO.Ports.SerialPort - - + + - +