-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Include resources in command line arguments produced by csc in design-time build (take 2) #11949
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
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.
Pull Request Overview
This PR enhances the design-time build by ensuring resource items carry an explicit output path before code generation runs.
- Introduce a new
AssignEmbeddedResourceOutputPathstarget and wire it into thePrepareResourceNamesDependsOnsequence. - Refactor
OutputResourcesto use the newly assigned%(OutputResource)metadata. - Add a dependency for
_GenerateCompileInputsonPrepareResourceNamesto guarantee metadata is set.
Comments suppressed due to low confidence (2)
src/Tasks/Microsoft.Common.CurrentVersion.targets:3255
- There are no automated tests covering the new
AssignEmbeddedResourceOutputPathstarget. Consider adding unit or integration tests to verify thatOutputResourcemetadata is correctly set for EmbeddedResource items.
<Target Name="AssignEmbeddedResourceOutputPaths">
src/Tasks/Microsoft.Common.CurrentVersion.targets:3253
- [nitpick] The XML comment could be expanded to note which downstream targets rely on this metadata (e.g.,
_GenerateCompileInputsandGetItemTargetPaths), improving clarity for future maintainers.
Sets OutputResource metadata on EmbeddedResource items. This metadata is used in design time build without running ResGen target.
|
Looks ok to me but should we test it in the VMR too since it broke there? |
|
@rainersigwald How do I do that? |
|
Create a draft PR with this same content in |
|
Validation PR: dotnet/dotnet#987 |
|
Oh, wait ... this was still broken. I had to tweak the code in the validation PR. Let me submit a fix... |
Iteration on #11893, which had to be reverted.
Adds condition to only update
OutputResourceif it is not set already.