-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Provide MSB4191 documentation content for transfer to msbuild-api-docs #13054
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
base: main
Are you sure you want to change the base?
Conversation
|
Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
Co-authored-by: YuliiaKovalova <[email protected]>
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 documents a common MSBuild limitation (MSB4191 error) where item metadata conditions fail at the project level but work inside targets. This addresses a frequently encountered issue where developers attempt to use batching syntax outside of target execution.
Changes:
- Created comprehensive documentation explaining the MSB4191 error, its cause, and three practical workarounds
- Added link to the new documentation from the main README's "Problems?" section
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| documentation/wiki/Common-MSBuild-Gotchas.md | New documentation file explaining the item metadata condition limitation with examples and workarounds |
| documentation/README.md | Added link to the new Common-MSBuild-Gotchas.md file in the Problems section |
|
|
||
| For more context on why this limitation exists, see: | ||
| - [MSBuild Architecture Overview](../Contributions/MSBuild-overview.md) - explains the difference between evaluation and execution phases | ||
| - Issue [#3520](https://github.com/dotnet/msbuild/issues/3520) - original issue tracking this limitation |
Copilot
AI
Jan 19, 2026
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.
The issue number referenced here (#3520) does not match the issue number mentioned in the PR description (#3479). The link should point to the correct issue that this documentation is addressing.
| - Issue [#3520](https://github.com/dotnet/msbuild/issues/3520) - original issue tracking this limitation | |
| - Issue [#3479](https://github.com/dotnet/msbuild/issues/3479) - original issue tracking this limitation |
|
I think this should go in the mainline public docs, not in this repo. |
|
@copilot could you please move these changes to https://github.com/dotnet/msbuild-api-docs/pulls repo? |
Co-authored-by: YuliiaKovalova <[email protected]>
I've reverted the documentation changes from this repository in commit ce66be7. However, I can only work within the dotnet/msbuild repository. The documentation content would need to be created in the msbuild-api-docs repository by someone with access to that repository. The reverted documentation included:
Would you like me to provide the documentation content in a format that can be easily transferred to the msbuild-api-docs repository? |
|
@copilot |
Co-authored-by: YuliiaKovalova <[email protected]>
I've added the complete documentation content in The file includes:
The content is ready to copy-paste into msbuild-api-docs or adapt to fit its structure. |
Context
Per feedback from maintainers, documentation for the MSB4191 error (ItemGroup conditions using metadata batching syntax failing at project level) should be placed in the mainline public docs (msbuild-api-docs repository) rather than in this repository.
Changes Made
/documentation/wiki/Common-MSBuild-Gotchas.md- removed the documentation file that was originally created/documentation/README.md- removed the link to the documentation fileMSB4191-Documentation-Transfer.md- complete documentation content ready for transfer to msbuild-api-docs repositoryThe transfer document includes:
WithMetadataValue(), and other item functions)Testing
Notes
The documentation content in
MSB4191-Documentation-Transfer.mdis ready to be transferred to the dotnet/msbuild-api-docs repository as mainline public documentation. This PR keeps this repository focused on implementation while providing maintainers with complete, ready-to-use documentation content.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.