Repository navigation
Move to central package management - #4672
Merged
Merged
Conversation
Package versions now live in Directory.Packages.props. The AutoMapper package's public dependencies are grouped separately since their versions become the nuspec minimums. Transitive pinning is left off so test-only pins (e.g. System.Security.Cryptography.Pkcs) can't leak into the package. nuget.config now clears inherited sources and uses only nuget.org. The dnceng feed was only needed for the commented-out ApiCompat reference, which is removed. A single source also avoids NU1507, which TreatWarningsAsErrors would turn into a restore failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the central package management migration.
No open issues 🎉
What changed in this PR
Moves AutoMapper’s package versions into central package management while preserving existing versions and public dependency minimums.
Changes:
- Adds
Directory.Packages.props, grouping public dependencies separately from build, test, and sample dependencies. - Removes inline package versions while retaining framework conditions, private assets, and the integration-test security pin.
- Restricts package sources to nuget.org and removes the commented-out ApiCompat reference.
| File | Description |
|---|---|
| src/UnitTests/AutoMapper.UnitTests.csproj | Uses centrally managed test dependency versions. |
| src/TestApp/TestApp.csproj | Uses the central dependency injection version. |
| src/IntegrationTests/AutoMapper.IntegrationTests.csproj | Uses central versions, retaining the explicit Pkcs reference. |
| src/AutoMapper/AutoMapper.csproj | Uses central versions while preserving framework conditions and private assets. |
| src/AutoMapper.DI.Tests/AutoMapper.DI.Tests.csproj | Uses centrally managed test dependency versions. |
| nuget.config | Clears inherited sources and explicitly selects nuget.org. |
| Directory.Packages.props | Enables central package management and declares existing versions. |
| AutoMapper.slnx | Adds the central package file to solution items. |
Review effort: Balanced
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.
Summary
Directory.Packages.propswithManagePackageVersionsCentrally; removesVersionfrom everyPackageReference.CentralPackageTransitivePinningEnabledis intentionally off, so test-only pins (theSystem.Security.Cryptography.Pkcssecurity pin for SqlClient) can't get promoted into the shipped package's dependencies.nuget.confignow does<clear />+ nuget.org only. The dncengdotnet-engfeed was only needed for the commented-outMicrosoft.DotNet.ApiCompatreference, which is removed. Keeping an explicit single-source config makes restores independent of machine-level feeds and avoids NU1507, whichTreatWarningsAsErrorswould turn into a restore failure.Verification
dotnet build AutoMapper.slnx -c Release: 0 warnings, 0 errors<dependencies>are identical across all TFMs🤖 Generated with Claude Code