From 7e54a99fe55d3a7f14c886e89959c3f1bcc44d26 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 00:13:07 +0000 Subject: [PATCH 1/2] Use compiler-generated doc XML for PNSE builds For PNSE assemblies that opt into UseCompilerGeneratedDocXmlFile, resolve a compatible non-PNSE sibling target framework via IsCandidateCompilerGeneratedDocFile and use its compiler-generated doc XML instead of requiring the intellisense package. - Add IsCandidateCompilerGeneratedDocFile property and flow it through AdditionalTargetFrameworkInfoProperty so the outer build can identify candidate TFs. - Derive IsPlatformNotSupportedAssembly as a standalone property instead of computing it inline in ItemDefinitionGroup metadata. - Rename IntellisensePackageXmlFilePath to DocFileOverride to reflect that the doc file override can come from any source. - Add GetPNSEDocTargetFramework, AddProjectReferenceToPNSEDocSource, and SetDocFileOverrideFromPNSEDocSource targets to resolve and consume the sibling doc file. - Suppress the missing-intellisense-file warning for PNSE builds. --- eng/intellisense.targets | 117 ++++++++++++++++++++++++++++++++------- 1 file changed, 97 insertions(+), 20 deletions(-) diff --git a/eng/intellisense.targets b/eng/intellisense.targets index c6ddd0aa4eb3ec..f87ed2df34e159 100644 --- a/eng/intellisense.targets +++ b/eng/intellisense.targets @@ -2,20 +2,29 @@ true + + true + + $(UseCompilerGeneratedDocXmlFile) $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.private.intellisense', '$(MicrosoftPrivateIntellisenseVersion)', 'IntellisenseFiles')) - + $([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'net-10.0', '1033', '$(AssemblyName).xml')) $([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'net', '1033', '$(AssemblyName).xml')) - $(IntellisensePackageXmlFilePathFromNetVersionFolder) - $(IntellisensePackageXmlFilePathFromNetFolder) - - $([MSBuild]::NormalizePath('$(IntermediateOutputPath)', 'intellisense-package', '$(TargetName).xml')) - + $(IntellisensePackageXmlFilePathFromNetVersionFolder) + $(IntellisensePackageXmlFilePathFromNetFolder) + + + $(NoWarn);CS1591 + $([MSBuild]::NormalizePath('$(IntermediateOutputPath)', 'doc-override', '$(TargetName).xml')) + + opts out from using the compiler generated xml file. For PNSE builds the doc XML comes from a non-PNSE sibling + target framework, so the warning is not applicable. --> - + - + Inputs="$(DocFileOverride)" + Outputs="$(IntermediateDocFileOverride)"> + - + - + + Condition="'$(DocFileOverride)' != ''"> - + @@ -74,4 +87,68 @@ + + + + + + + + + + + + + + + @(_PNSECandidateTargetFramework) + + + + + + + + + + + + + + + + + @(PNSEDocSource->'%(DocFileItem)') + + + From 9d60fd14f48746266abbf8019842d9b5503d6d0f Mon Sep 17 00:00:00 2001 From: "Eric St. John" Date: Mon, 30 Mar 2026 18:52:50 -0700 Subject: [PATCH 2/2] Address feedback --- eng/intellisense.targets | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/intellisense.targets b/eng/intellisense.targets index f87ed2df34e159..9bb4a5387df06c 100644 --- a/eng/intellisense.targets +++ b/eng/intellisense.targets @@ -10,6 +10,7 @@ Condition="'$(TargetFramework)' != '' and '$(GeneratePlatformNotSupportedAssemblyMessage)' == '' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))">$(UseCompilerGeneratedDocXmlFile) + $([MSBuild]::NormalizePath('$(IntermediateOutputPath)', 'doc-override', '$(TargetName).xml')) @@ -22,9 +23,8 @@ - + $(NoWarn);CS1591 - $([MSBuild]::NormalizePath('$(IntermediateOutputPath)', 'doc-override', '$(TargetName).xml'))