1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 18:11:04 +09:00

Fix intellisense package xml file failing up-to-date check in libs projects (#105243)

Fixes https://github.com/dotnet/runtime/issues/92940
This commit is contained in:
Viktor Hofer 2024-07-23 10:35:37 +02:00 committed by GitHub
parent e2a3511925
commit 9477e94959
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,8 @@
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromNetFolder))">$(IntellisensePackageXmlFilePathFromNetFolder)</IntellisensePackageXmlFilePath>
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder))">$(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder)</IntellisensePackageXmlFilePath>
<IntermediateDocFileItemFromIntellisensePackage>$(IntermediateOutputPath)$(TargetName).intellisense-package.xml</IntermediateDocFileItemFromIntellisensePackage>
<!-- Suppress "CS1591 - Missing XML comment for publicly visible type or member" compiler errors when the intellisense package xml file is used. -->
<NoWarn Condition="'$(SkipIntellisenseNoWarnCS1591)' != 'true'">$(NoWarn);1591</NoWarn>
</PropertyGroup>
@ -25,13 +27,26 @@
<PackageDownload Include="Microsoft.Private.Intellisense" Version="[$(MicrosoftPrivateIntellisenseVersion)]" />
</ItemGroup>
<!-- Prepare the intellisense package xml file by copying it to the project's intermediate folder and update its file timestamp.
This is necessary so that all project outputs are newer than all project inputs. Directly copying from the intellisense package
would violate that and break fast up-to-date check. -->
<Target Name="PrepareIntellisensePackageXmlFile"
Inputs="$(IntellisensePackageXmlFilePath)"
Outputs="$(IntermediateDocFileItemFromIntellisensePackage)">
<Copy SourceFiles="$(IntellisensePackageXmlFilePath)"
DestinationFiles="$(IntermediateDocFileItemFromIntellisensePackage)" />
<Touch Files="$(IntermediateDocFileItemFromIntellisensePackage)" />
</Target>
<!-- Replace the compiler generated xml file in the obj folder with the one that comes from the intellisense package. -->
<Target Name="ChangeDocumentationFileForPackaging"
DependsOnTargets="PrepareIntellisensePackageXmlFile"
BeforeTargets="CopyFilesToOutputDirectory;DocumentationProjectOutputGroup"
Condition="'$(UseCompilerGeneratedDocXmlFile)' != 'true' and '$(IntellisensePackageXmlFilePath)' != ''">
<ItemGroup>
<DocFileItem Remove="@(DocFileItem)" />
<DocFileItem Include="$(IntellisensePackageXmlFilePath)" />
<DocFileItem Include="$(IntermediateDocFileItemFromIntellisensePackage)" />
</ItemGroup>
</Target>