-
-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
Proposal
Adopt MSBuild's Central Package Management (CPM) by creating Directory.Packages.props to manage all 60+ NuGet package versions across 18 projects from a single location.
Current State
- Each
.csprojfile contains its own<PackageReference>elements with explicit version attributes - Package versions are duplicated across multiple projects
- Version inconsistencies exist (e.g.,
Azure.Monitor.Queryuses both 1.4.0 and 1.3.1) Guard.Netcasing is inconsistent across projects
Proposed Solution
- Create
src/Directory.Packages.propswithManagePackageVersionsCentrallyenabled - Define all package versions centrally using
<PackageVersion>elements - Remove
Versionattributes from all<PackageReference>elements in project files - Standardize
Azure.Monitor.Queryto version 1.4.0 - Standardize
Guard.Netcasing toGuard.NET - Keep security-pinned packages (System.Drawing.Common, System.Security.Cryptography.*) centralized with comments explaining security requirements
Benefits
✅ Single source of truth for package versions
✅ Easier version updates via Renovate
✅ Prevents version conflicts across projects
✅ Simplified maintenance for the solution
✅ Better dependency visibility for contributors
✅ Consistent versions across all 18 projects
Implementation Notes
- All 18 projects need to be updated
- Security-pinned packages will remain centrally managed with explanatory comments
- Renovate bot already supports
Directory.Packages.propsby default - Microsoft recommends this approach for multi-project solutions
References
Metadata
Metadata
Assignees
Labels
No labels