-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add hook for importing .props file after .NET SDK props #45151
base: release/9.0.2xx
Are you sure you want to change the base?
Add hook for importing .props file after .NET SDK props #45151
Conversation
Seems like this would also cover part of ##1696? The "after SDK .targets" part I mean. |
Thanks for pointing that out, this does address part of that request. Also, any preference on the property naming? I went with |
My two thoughts on naming, we should use "AfterMicrosoftNETSdkProps", for three reasons:
|
I personally don't have a strong opinion one way or the other. My preference in general is to use the |
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.
Is there a good place to document this extensibility point?
@@ -170,4 +170,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
<Import Project="$(MSBuildThisFileDirectory)../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props" Condition="Exists('$(MSBuildThisFileDirectory)../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props')" /> | |||
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Windows.props" /> | |||
|
|||
<!-- Hook for importing custom logic after .NET SDK props, for example for additional default item processing --> |
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.
<!-- Hook for importing custom logic after .NET SDK props, for example for additional default item processing --> | |
<!-- | |
Extensibility point for users to import build logic after all of the .NET SDKs .props are imported but before the project's contents are evaluated. | |
This can be useful for overriding default globs or properties that the SDK sets. | |
--> |
+1 to this. I could not find any existing docs clearly documenting all existing MSBuild/.NET SDK hooks 😅 |
FYI @baronfel @marcpopMSFT, I added the consider-for-documentation tag |
Add a hook for a .props import after the .NET SDK props, which is useful for modifying the default item globs.