Skip to content

Update and consolidate MongoDB dependencies - #20607

Merged
Eric Erhardt (eerhardt) merged 2 commits into
mainfrom
eerhardt-mongodb-dependency-consolidation
Sep 30, 2026
Merged

Eric Erhardt (eerhardt) merged 2 commits into
mainfrom
eerhardt-mongodb-dependency-consolidation

Conversation

@eerhardt

@eerhardt Eric Erhardt (eerhardt) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

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.

  • Update the shared MongoDB.Driver version to 3.12.0 and remove the stale net9.0 override.
  • Update MongoDB.EntityFrameworkCore from 8.4.1 to 8.4.4 for net8.0 and from 9.0.0 to 9.1.4 for net9.0, and use 10.0.4 for the new net10.0 target.
  • Change Aspire.MongoDB.EntityFrameworkCore and its test project to use $(AllTargetFrameworks) (net8.0;net9.0;net10.0), adding a dedicated .NET 10 asset and extending the existing test suite to that framework.
  • Remove redundant Snappier references from the v3 driver and EF Core integrations. MongoDB.Driver 3.12.0 already requires Snappier 1.3.1.
  • Leave the v2 integration's driver range and explicit Snappier pin unchanged.

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 commit 335a5f89e9 added 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 $repo for the absolute repository root; the current SDK test runner requires absolute project paths.

$repo = (Get-Location).Path
dotnet test --project "$repo\tests\Aspire.MongoDB.EntityFrameworkCore.Tests\Aspire.MongoDB.EntityFrameworkCore.Tests.csproj" --no-launch-profile -- --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
dotnet test --project "$repo\tests\Aspire.MongoDB.Driver.Tests\Aspire.MongoDB.Driver.Tests.csproj" --no-launch-profile -- --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
  • EF Core tests at aa5906038d: passed, 116 passed and 44 skipped across net8.0 and net9.0.
  • Driver tests at aa5906038d: passed, 129 passed and 6 skipped across net8.0, net9.0, and net10.0.
  • EF Core net10.0 tests: not run locally as part of the validation reported here. The earlier EF results do not cover the newly added target.
dotnet pack src\Components\Aspire.MongoDB.EntityFrameworkCore\Aspire.MongoDB.EntityFrameworkCore.csproj --no-build --no-restore -c Debug -v minimal
dotnet pack src\Components\Aspire.MongoDB.Driver\Aspire.MongoDB.Driver.csproj --no-build --no-restore -c Debug -v minimal

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

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

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>
@github-actions

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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20607

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20607"

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot September 30, 2026 14:47
@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Sep 30, 2026
@github-actions

This comment has been minimized.

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.

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.

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

Selects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'Directory.Packages.props' selects ALL


Selection computed for commit 335a5f8.

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.

Copilot review overview

🟡 Changes recommended

The newly shipped net10.0 target is omitted from the stated scope and reported validation.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1799

Generated by PR Documentation Check · copilot · auto · 115.1 AIC · ⌖ 12.6 AIC · ⊞ 20.3K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1799 targeting release/13.6.

Triggered signals: target_framework_changed (evidence: Aspire.MongoDB.EntityFrameworkCore.csproj changed TargetFrameworks from $(DefaultTargetFramework);net9.0 to $(AllTargetFrameworks), adding net10.0) and pr_body_has_cli_flag_mention (validation commands in the PR body). No existing docs page named the net10.0 target or the consolidated MongoDB.Driver 3.12.0/MongoDB.EntityFrameworkCore 10.0.4 versions, so documentation was required.

Changes:

  • whats-new/aspire-13-6.mdx: added an Integration updates bullet noting the new net10.0 asset for Aspire.MongoDB.EntityFrameworkCore, the MongoDB.EntityFrameworkCore 10.0.4 version for that target, the consolidated MongoDB.Driver 3.12.0 version across frameworks, and removal of the redundant explicit Snappier reference.
  • integrations/databases/efcore/mongodb/mongodb-efcore-get-started.mdx: noted the package now targets net8.0, net9.0, and net10.0.

Note

This draft PR needs human review before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants