[automated] Merge branch 'vs17.6' => 'main'#8654
Merged
rainersigwald merged 3 commits intodotnet:mainfrom Apr 12, 2023
Merged
Conversation
The return value of `ITaskItem.CloneCustomMetadata` is an `IDictionary`, which is generally (in modern MSBuild) backed by a `Dictionary<string, string>`, but can be (when given an item from a net35 taskhost) a `Hashtable`. In the latter situation, casting entries to `KeyValuePair<,>` fails, because they conform only to `DictionaryEntry`. Use that less-well-typed approach--the casts were present in the pre- bulk-edit version of the code. Fixes dotnet#8645.
4c9e8aa to
8ffc3fe
Compare
rainersigwald
requested changes
Apr 11, 2023
Member
rainersigwald
left a comment
There was a problem hiding this comment.
Putting a block on this because .NET Tactics asked for a regression test in main, which I'll work on.
f4f00a2 to
892ec22
Compare
Add a test task with properties like the failing WiX tasks to prevent regressions of dotnet#8645.
892ec22 to
a478b9d
Compare
Forgind
approved these changes
Apr 12, 2023
|
|
||
| public IDictionary CloneCustomMetadata() | ||
| { | ||
| Hashtable t = new(); |
Contributor
There was a problem hiding this comment.
This is the important part, right? That it's a Hashtable and not a Dictionary<string, string>?
Member
There was a problem hiding this comment.
Correct. I considered writing an even-more-malicious IDictionary implementation but it seemed like overkill.
| return t; | ||
| } | ||
| public void CopyMetadataTo(ITaskItem destinationItem) => throw new NotImplementedException(); | ||
| public string GetMetadata(string metadataName) => "value"; |
Contributor
There was a problem hiding this comment.
This probably shouldn't be my focus, since this is a test, but it bothers me a little that this will return "value" for undefined metadata. It's fine if you want to leave it, but I'd slightly prefer a check for "key" (and updating the test above accordingly)
rainersigwald
approved these changes
Apr 12, 2023
This was referenced Jul 29, 2025
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I detected changes in the vs17.6 branch which have not been merged yet to main. I'm a robot and am configured to help you automatically keep main up to date, so I've opened this PR.
This PR merges commits made on vs17.6 by the following committers:
Instructions for merging from UI
This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.
If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.
Instructions for merging via command line
Run these commands to merge this pull request from the command line.
or if you are using SSH
After PR checks are complete push the branch
Instructions for resolving conflicts
Instructions for updating this pull request
Contributors to this repo have permission update this pull request by pushing to the branch 'merge/vs17.6-to-main'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
or if you are using SSH
Contact .NET Core Engineering if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/master/scripts/GitHubMergeBranches.ps1.