Skip to content

Simplify ProjectFileUtils.AddItem overloads - #7378

Merged
nkolev92 merged 5 commits into
devfrom
dev-nkolev92-improveUtils
May 11, 2026
Merged

nkolev92 merged 5 commits into
devfrom
dev-nkolev92-improveUtils

Conversation

@nkolev92

@nkolev92 nkolev92 commented May 8, 2026 •

Copy link
Copy Markdown
Member

Bug

Description

Simplifies ProjectFileUtils.AddItem overloads and updates callers:

  • Removes the properties parameter from the NuGetFramework overload, since all callers passed an empty dictionary. Callers that need element-style metadata use the string framework overload instead.
  • Adds a new file-based AddItem overload that takes a project file path, handles open/load/write internally, reducing boilerplate at call sites.

The goal of this change is to enable PRs like 6250b35 to be much much much simpler.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@nkolev92
nkolev92 requested a review from a team as a code owner May 8, 2026 19:47
@nkolev92
nkolev92 requested review from Nigusu-Allehu and jebriede May 8, 2026 19:47
@nkolev92 nkolev92 changed the title Simplify ProjectFileUtils.AddItem overloads and remove unused converter Simplify ProjectFileUtils.AddItem overloads May 8, 2026
…ngTests and RestoreNETCoreTest

Co-authored-by: Copilot <[email protected]>
@nkolev92
nkolev92 merged commit c8a073c into dev May 11, 2026
17 of 18 checks passed
@nkolev92
nkolev92 deleted the dev-nkolev92-improveUtils branch May 11, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants