-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change execution order conditions for intellisense swapping and copying msbuild targets. #83117
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,20 @@ | |
</PropertyGroup> | ||
|
||
<Target Name="VerifyAssemblySupportsDocsXmlGeneration" | ||
Condition="'$(UseIntellisensePackageDocXmlFile)' != 'true'"> | ||
<Error | ||
Condition="'$(IsPartialFacadeAssembly)' == 'true'" | ||
Text="The 'UseIntellisensePackageDocXmlFile' property is not supported for partial facade assemblies: $(AssemblyName)" /> | ||
<Error | ||
Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''" | ||
Text="The 'UseIntellisensePackageDocXmlFile' property is not supported for assemblies that throw PlatformNotSupportedException: $(AssemblyName)" /> | ||
Condition="'$(UseIntellisensePackageDocXmlFile)' != 'true'"> | ||
<Error Text="The 'UseIntellisensePackageDocXmlFile' property is not supported for partial facade assemblies: $(AssemblyName)" | ||
Condition="'$(IsPartialFacadeAssembly)' == 'true'" /> | ||
<Error Text="The 'UseIntellisensePackageDocXmlFile' property is not supported for assemblies that throw PlatformNotSupportedException: $(AssemblyName)" | ||
Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''" /> | ||
</Target> | ||
|
||
<PropertyGroup> | ||
<NoWarn Condition="'$(UseIntellisensePackageDocXmlFile)' == 'true'">$(NoWarn);1591</NoWarn> | ||
<PropertyGroup Condition="'$(UseIntellisensePackageDocXmlFile)' == 'true'"> | ||
<NoWarn>$(NoWarn);1591</NoWarn> | ||
<IntellisensePackageXmlRootFolder>$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.private.intellisense', '$(MicrosoftPrivateIntellisenseVersion)', 'IntellisenseFiles'))</IntellisensePackageXmlRootFolder> | ||
<IntellisensePackageXmlFilePathFromNetFolder>$([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'net', '1033', '$(AssemblyName).xml'))</IntellisensePackageXmlFilePathFromNetFolder> | ||
<IntellisensePackageXmlFilePathFromDotNetPlatExtFolder>$([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'dotnet-plat-ext', '1033', '$(AssemblyName).xml'))</IntellisensePackageXmlFilePathFromDotNetPlatExtFolder> | ||
<IntellisensePackageXmlFilePath Condition="'$(UseIntellisensePackageDocXmlFile)' == 'true' and Exists($(IntellisensePackageXmlFilePathFromNetFolder))">$(IntellisensePackageXmlFilePathFromNetFolder)</IntellisensePackageXmlFilePath> | ||
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and '$(UseIntellisensePackageDocXmlFile)' == 'true' and Exists($(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder))">$(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder)</IntellisensePackageXmlFilePath> | ||
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromNetFolder))">$(IntellisensePackageXmlFilePathFromNetFolder)</IntellisensePackageXmlFilePath> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK cool. I see it makes more sense to check its own value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CI is green now, nice! |
||
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder))">$(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder)</IntellisensePackageXmlFilePath> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
|
@@ -30,22 +28,23 @@ | |
<!-- TODO: Remove this target when no library relies on the intellisense documentation file anymore.--> | ||
<!-- Replace the default xml file generated in the obj folder with the one that comes from the docs feed. --> | ||
<Target Name="ChangeDocumentationFileForPackaging" | ||
AfterTargets="DocumentationProjectOutputGroup" | ||
Condition="'$(UseIntellisensePackageDocXmlFile)' == 'true'"> | ||
BeforeTargets="CopyFilesToOutputDirectory;DocumentationProjectOutputGroup" | ||
Condition="'$(IntellisensePackageXmlFilePath)' != ''"> | ||
<ItemGroup> | ||
<DocFileItem Remove="@(DocFileItem)" /> | ||
<DocFileItem Include="$(IntellisensePackageXmlFilePath)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<!-- Copy the intellisense file to the folder we use to produce the targeting pack. | ||
The condition is for the RID agnostic build of source assemblies that are part of the .NET Core shared framework. --> | ||
<Target Name="CopyDocumentationFileToXmlDocDir" | ||
AfterTargets="CopyFilesToOutputDirectory" | ||
Condition="'$(IsNetCoreAppSrc)' == 'true' and '$(TargetFramework)' == '$(NetCoreAppCurrent)'" | ||
DependsOnTargets="ChangeDocumentationFileForPackaging"> | ||
Condition="'$(IsNetCoreAppSrc)' == 'true' and '$(TargetFramework)' == '$(NetCoreAppCurrent)'"> | ||
<Copy SourceFiles="@(DocFileItem)" | ||
DestinationFolder="$(XmlDocDir)" | ||
SkipUnchangedFiles="true" | ||
UseHardlinksIfPossible="true" /> | ||
</Target> | ||
|
||
</Project> | ||
</Project> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need 1591 here?