Skip to content

Fix NuGet restore loop with CPM for SqlDatabaseProjects#1291

Merged
aaronpowell merged 5 commits into
CommunityToolkit:mainfrom
almostchristian:dev/fix-sqlproj-cpm-restore
May 18, 2026
Merged

Fix NuGet restore loop with CPM for SqlDatabaseProjects#1291
aaronpowell merged 5 commits into
CommunityToolkit:mainfrom
almostchristian:dev/fix-sqlproj-cpm-restore

Conversation

@almostchristian

Copy link
Copy Markdown
Contributor

Closes #1065

Fixes a NuGet restore loop / circular dependency when using Central Package Management (Directory.Packages.props) with CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.

This updates the props file in CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects to mark the PackageReferences as implicitly defined (IsImplicitlyDefined="true"), preventing CPM from treating them as explicit references and thrashing during restore.

Fixes #1065

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Code follows all style conventions

Other information

Discussion on the IsImplicitlyDefined property and its relationship with CPM NuGet/Home#13529

Copilot AI review requested due to automatic review settings April 23, 2026 10:32
@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1291

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1291"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a NuGet restore loop/circular dependency affecting CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects when consumers use Central Package Management (Directory.Packages.props) by marking build-injected PackageReferences as implicitly defined.

Changes:

  • Add IsImplicitlyDefined="true" to Microsoft.Build* package references injected via the integration’s .props file to prevent CPM from treating them as explicit references.

@ErikEJ

ErikEJ commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

LGTM - looking foward to @jmezach 's comments

@aaronpowell aaronpowell enabled auto-merge (squash) May 18, 2026 04:36
aaronpowell and others added 2 commits May 18, 2026 14:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ErikEJ

ErikEJ commented May 18, 2026

Copy link
Copy Markdown
Contributor

@aaronpowell Privateassets true is not a valid value

@aaronpowell aaronpowell merged commit 8724c72 into CommunityToolkit:main May 18, 2026
121 of 126 checks passed
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.

[SQLProjects] NuGet restore loop with centrally managed packages

5 participants