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

Make DeepCopyFrom (for ProjectElementContainers) copy all descendants instead of just the direct children #7454

Merged
merged 2 commits into from
Mar 24, 2022

Conversation

Forgind
Copy link
Member

@Forgind Forgind commented Mar 10, 2022

Fixes #7435

Context
When "DeepCopy"ing ProjectItemGroupElements, we copied attributes but not children, which meant we would lose them if present.

Changes Made
Recursively copy children as well.

Testing
Ran (and passed) rainersigwald's unit test.

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Mar 10, 2022
@Forgind Forgind changed the title Deep copy 2 Make DeepCopyFrom (for ProjectElementContainers) copy all descendants instead of just the direct children Mar 24, 2022
@rainersigwald rainersigwald merged commit e39a9be into dotnet:main Mar 24, 2022
@Forgind Forgind deleted the deep-copy-2 branch April 28, 2022 23:05
rainersigwald added a commit to rainersigwald/msbuild that referenced this pull request Apr 29, 2022
Forgind added a commit that referenced this pull request May 2, 2022
Revert #7454 to fix double-DeepCopy regression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeepCopyFrom fails to copy metadata values that are structured xml
2 participants