-
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
Create dummy AfterSdkPublish target Fixes #26710 #36850
Conversation
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.
It would be good to have some tests for this.
I have a strong suspicion that this change does not actually work for all cases. The unit test seems to only cover the non-web case (when For the web case... it looks to me like the earliest time sdk/src/WebSdk/Publish/Targets/DotNetCLIToolTargets/Microsoft.NET.Sdk.DotNetCLITool.targets Lines 17 to 21 in 856d348
In other words, isn't |
Should it be based on
|
This is based on feedback: #36850 (comment) #26710 (comment) It seems that the property used for this for web-based projects is typically set in a target, which means it isn't available at evaulation time. This changes the property used to determine if a project is web-based to one set by importing the web sdk. Although I think it should not be used in almost any case, it also adds the option of specifying that the target should run after a specified target. If a new project type comes up that has an AfterAfterPublish, for instance, and we want to run this after that, this makes it easy to support that.
Fixes #26710
After discussions with @baronfel and @vijayrkn, it sounds like the cleanest solution for customers who want an "AfterPublish" target in non-web projects is to introduce a new dummy "AfterSdkPublish" target in the base SDK. There appear to be no references to such a target on GitHub, through an online search, or in the DevDiv repo on AzDO, so this is likely safe and hopefully helpful.