Update and consolidate MongoDB dependencies - #20607
Conversation
Use MongoDB.Driver 3.12.0 across target frameworks, update the EF Core providers, and remove redundant Snappier references from the v3 integrations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20607Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20607" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The dependency graph remains consistent across target frameworks, preserves the v2 constraints, and has appropriate validation.
Review effort: Balanced
Findings: None
What changed in this PR
Consolidates MongoDB integrations on compatible, current dependency versions across supported target frameworks.
Changes:
- Updates MongoDB.Driver to 3.12.0 and EF Core providers to 8.4.4/9.1.4.
- Removes redundant Snappier references while preserving the v2 integration pin.
| File | Description |
|---|---|
Directory.Packages.props |
Updates and consolidates MongoDB package versions. |
src/Components/Aspire.MongoDB.Driver/Aspire.MongoDB.Driver.csproj |
Removes redundant Snappier reference. |
src/Components/Aspire.MongoDB.EntityFrameworkCore/Aspire.MongoDB.EntityFrameworkCore.csproj |
Removes redundant Snappier reference. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Tests selectorSelects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'Directory.Packages.props' selects ALL Selection computed for commit |
|
Pull request created: #1799
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1799 targeting Triggered signals: Changes:
Note This draft PR needs human review before merging. |

Description
The net9.0 integrations currently select MongoDB.Driver 3.3.0 while net8.0 selects 3.9.0. Use MongoDB.Driver 3.12.0 consistently across target frameworks, update the framework-specific MongoDB EF Core providers, and add a net10.0 shipping asset for Aspire.MongoDB.EntityFrameworkCore.
$(AllTargetFrameworks)(net8.0;net9.0;net10.0), adding a dedicated .NET 10 asset and extending the existing test suite to that framework.MongoDB.Driver 3.12.0 is already available on the approved dotnet-public feed. The upstream driver now requires MongoDB Server 4.4 or later; see the 3.10.0 release notes.
Validation
The local results below were recorded at commit
aa5906038d, before commit335a5f89e9added the EF Core net10.0 target. They include container-backed scenarios. No new test methods were added; the existing EF Core test suite now also targets net10.0.Commands below use
$repofor the absolute repository root; the current SDK test runner requires absolute project paths.aa5906038d: passed, 116 passed and 44 skipped across net8.0 and net9.0.aa5906038d: passed, 129 passed and 6 skipped across net8.0, net9.0, and net10.0.Both pack commands passed at
aa5906038d. Inspected the restored dependency graphs and generated NuGet manifests to confirm MongoDB.Driver 3.12.0, the EF provider versions, and transitive Snappier 1.3.1 for the targets present at that commit. The EF Core package then contained only net8.0 and net9.0 assets; pack and asset verification for the newly added EF Core net10.0 target are not covered by those results.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?