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

Document common hook points for build extensions #10143

Open
rainersigwald opened this issue May 16, 2024 · 1 comment
Open

Document common hook points for build extensions #10143

rainersigwald opened this issue May 16, 2024 · 1 comment

Comments

@rainersigwald
Copy link
Member

rainersigwald commented May 16, 2024

We have https://learn.microsoft.com/visualstudio/msbuild/msbuild-targets#sdk-and-default-build-targets but it's not super clear, I think it'd be helpful to have more clear documentation for common use cases.

(https://mastodon.social/@mcc/112451423829765088)

Some examples

Scenario Hook point
"I just need to do something early in the build" BeforeTargets="BeforeBuild"
"I need to modify the list of resolved references before anything uses it" AfterTargets="ResolveReferences"
"I want to generate some C# source" BeforeTargets="BeforeCompile"
"I have some files that I would want to add to Content or None to get copied to the output, but I generate them during the build" BeforeTargets="AssignTargetPaths"
"I need to produce or change an output before this project is done" AfterTargets="AfterBuild"
@rainersigwald
Copy link
Member Author

Added

"I have some files that I would want to add to Content or None to get copied to the output, but I generate them during the build"

thanks to https://mastodon.social/@mcc/112452180875718741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant