Skip to content
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

Proposal: Unified Extension points for Imports #4539

Open
Nirmal4G opened this issue Jul 23, 2019 · 2 comments
Open

Proposal: Unified Extension points for Imports #4539

Nirmal4G opened this issue Jul 23, 2019 · 2 comments
Labels
Milestone

Comments

@Nirmal4G
Copy link
Contributor

Nirmal4G commented Jul 23, 2019

W.R.T to #1686

If we do get a Base SDK and/or a Managed SDK that's above .NET SDK, then I would propose to unify the Import Extensibility points they offer.

Base SDK props

  • Directory.Build.props
  • <ProjectName>.<Vendor>.Before.props

Any SDK props

  • CustomBefore<SdkName>Props
  • <SDK props>
  • CustomAfter<SdkName>Props

Base SDK props

  • <ProjectName>.<Vendor>.After.props

Project File

  • CustomImportBeforeProject / CustomBefore<ProjectName> / Custom.Project.props
  • <Project File>
  • CustomImportAfterProject / CustomAfter<ProjectName> / Custom.Project.targets

Base SDK targets

  • <ProjectName>.<Vendor>.Before.targets

Any SDK targets

  • CustomBefore<SdkName>Targets
  • <SDK targets>
  • CustomAfter<SdkName>Targets

Base SDK targets

  • <ProjectName>.<Vendor>.After.targets
  • Directory.Build.targets

NOTE: Custom Before/After are user extensibility points. They are optional as they depend on the SDK implementers. MSBuildSdks already follows the Custom pattern I mentioned above.

@Nirmal4G
Copy link
Contributor Author

Nirmal4G commented Jul 23, 2019

Implementation Suggestions

All these could be implemented within MSBuild engine programatically, since they are unique to either the SDKs or the Project file themselves. (Breaking Change)

OR

We can put them as best practices on MSBuild Docs (issue: #2767) and add them to the official SDKs if these extension points are needed. (Safe Haven)

@Nirmal4G
Copy link
Contributor Author

Nirmal4G commented Jul 23, 2019

This would also enable #1045 via the <ProjectName>.<Vendor>.Before.targets!

This proposal can be augmented with #1756

@livarcocc livarcocc added this to the Discussion milestone Jul 23, 2019
@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants