Skip to content

Migrate repository package versioning to Central Package Management and updated versions#555

Draft
Copilot wants to merge 15 commits into
mainfrom
copilot/repo-migration-to-cpm
Draft

Migrate repository package versioning to Central Package Management and updated versions#555
Copilot wants to merge 15 commits into
mainfrom
copilot/repo-migration-to-cpm

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Description

This PR migrates the repo to NuGet Central Package Management so package versions are defined once and consumed consistently across all projects, and incorporates follow-up review feedback on package organization and versions.

  • Added root Directory.Packages.props with ManagePackageVersionsCentrally=true.
  • Enabled central transitive pinning with CentralPackageTransitivePinningEnabled=true.
  • Centralized package versions in PackageVersion items, including target-framework-specific conditional entries.
  • Removed inline Version="..." from PackageReference entries across source and test projects.
  • Moved package references out of Directory.Build.props and tests/Directory.Build.props into individual project files.
  • Reordered conditional item groups in Directory.Packages.props and later removed now-unneeded empty conditional groups.
  • Sorted PackageVersion entries alphabetically within each ItemGroup in Directory.Packages.props.
  • Replaced VersionOverride usage for Microsoft.NETFramework.ReferenceAssemblies in src/JWT/JWT.csproj with a conditional PackageVersion in Directory.Packages.props for the corresponding target framework.
  • Consolidated package reference declarations in src/JWT.Extensions.AspNetCore/JWT.Extensions.AspNetCore.csproj into a single top ItemGroup for PackageReference items.
  • Consolidated Microsoft.Extensions.DependencyInjection.Abstractions package reference declarations in src/JWT.Extensions.DependencyInjection/JWT.Extensions.DependencyInjection.csproj by removing redundant conditional ItemGroups and keeping a single top PackageReference item group.
  • Updated source and test project files so package reference ItemGroups are placed above project reference ItemGroups.
  • Normalized ItemGroup formatting across updated projects: no extra blank lines within groups, and a single blank line between groups.
  • Reordered tests/JWT.Tests.Net80/JWT.Tests.Net80.csproj so the Compile item group is below the ProjectReference item group.
  • Split the top unconditional PackageVersion declarations in Directory.Packages.props into two item groups: regular packages and test-related packages.
  • Reordered tests/JWT.Tests.Common/JWT.Tests.Common.csproj so file include/remove references are below the ProjectReference item group.
  • Simplified tests/JWT.Extensions.DependencyInjection.Tests/JWT.Extensions.DependencyInjection.Tests.csproj by replacing conditional Microsoft.Extensions.DependencyInjection package-reference item groups with a single unconditional item group.
  • Simplified tests/JWT.Extensions.AspNetCore.Tests/JWT.Extensions.AspNetCore.Tests.csproj by replacing conditional Microsoft.AspNetCore.TestHost package-reference item groups with a single unconditional item group.
  • Moved Microsoft.AspNetCore.TestHost central package versions into the second (test-related) ItemGroup in Directory.Packages.props using per-target-framework conditions, and removed now-empty framework-specific ItemGroups.
  • Reordered conditional ItemGroups in Directory.Packages.props to the requested order: net35, netstandard2.0, net6.0, net8.0.
  • Bumped src/JWT/JWT.csproj package version to 11.1.0-beta1.
  • Updated central System.Text.Json to 10.0.8.
  • Moved Microsoft.Extensions.DependencyInjection to the unconditional (first) PackageVersion item group.
  • Downgraded Microsoft.Extensions.DependencyInjection.Abstractions for netstandard2.0 to 8.0.2.
  • Kept Microsoft.AspNetCore.TestHost for net8.0 at 8.0.8 for framework compatibility.
  • Updated unit test projects to use two package-reference groups: one for regular test packages and one for build-time packages with PrivateAssets=all.

Checklist

  • Tests added
  • Version bumped
  • Changelog updated

Copilot AI changed the title [WIP] Migrate repository to Central Package Management Migrate repository package versioning to Central Package Management May 13, 2026
Copilot AI requested a review from abatishchev May 13, 2026 04:16
Comment thread tests/Directory.Build.props
Comment thread Directory.Build.props Outdated
Comment thread src/JWT/JWT.csproj Outdated
Agent-Logs-Url: https://github.com/jwt-dotnet/jwt/sessions/e91c4aab-1454-4504-9485-fe8dbc99c18b

Co-authored-by: abatishchev <351644+abatishchev@users.noreply.github.com>
Copilot AI requested a review from abatishchev May 13, 2026 15:32
Comment thread src/JWT.Extensions.AspNetCore/JWT.Extensions.AspNetCore.csproj
Comment thread src/JWT.Extensions.DependencyInjection/JWT.Extensions.DependencyInjection.csproj Outdated
Comment thread tests/JWT.Tests.Net60/JWT.Tests.Net60.csproj
Comment thread tests/JWT.Tests.Net80/JWT.Tests.Net80.csproj
Comment thread Directory.Packages.props
Agent-Logs-Url: https://github.com/jwt-dotnet/jwt/sessions/15b2593e-4f44-43e9-be18-4b6144eee1e5

Co-authored-by: abatishchev <351644+abatishchev@users.noreply.github.com>
Copilot AI requested a review from abatishchev May 13, 2026 19:04
Comment thread Directory.Packages.props
<ItemGroup>
<PackageVersion Include="AutoFixture" Version="4.18.1" />
<PackageVersion Include="FluentAssertions" Version="8.10.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="6.0.33" Condition="'$(TargetFramework)' == 'net6.0'" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot always use the same version of TestHost, 10.0.8

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I validated this request locally: setting Microsoft.AspNetCore.TestHost to 10.0.8 causes restore errors (NU1202) for net6.0, net8.0, and netcoreapp3.1 because 10.0.8 only supports net10.0. I kept the framework-compatible versions, so no commit was made for this comment. No UI changes were made, so there is no UI screenshot.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot then move Microsoft.AspNetCore.TestHost into a separate item group, each with the corresponding condition (by target framework)

Comment thread Directory.Packages.props
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot always use the same version of DependencyInjection.Abstractions, 10.0.8. Means, get rid of conditions and move the single entry for the package reference to the 1st item group

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot do it now

Copilot AI requested a review from abatishchev May 13, 2026 19:10
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 2491a723-7cee-4c3b-aa0f-5a1cde72ed90

Sorry for the inconvenience!

5 similar comments
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 2491a723-7cee-4c3b-aa0f-5a1cde72ed90

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 2491a723-7cee-4c3b-aa0f-5a1cde72ed90

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 2491a723-7cee-4c3b-aa0f-5a1cde72ed90

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 2491a723-7cee-4c3b-aa0f-5a1cde72ed90

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 2491a723-7cee-4c3b-aa0f-5a1cde72ed90

Sorry for the inconvenience!

Comment thread Directory.Packages.props
<ItemGroup>
<PackageVersion Include="AutoFixture" Version="4.18.1" />
<PackageVersion Include="FluentAssertions" Version="8.10.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="6.0.33" Condition="'$(TargetFramework)' == 'net6.0'" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot remove codition

Comment thread Directory.Packages.props
<ItemGroup>
<PackageVersion Include="AutoFixture" Version="4.18.1" />
<PackageVersion Include="FluentAssertions" Version="8.10.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="6.0.33" Condition="'$(TargetFramework)' == 'net6.0'" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot then move Microsoft.AspNetCore.TestHost into a separate item group, each with the corresponding condition (by target framework)

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: c904596f-ba0f-41aa-821c-1068e31bee97

Sorry for the inconvenience!

3 similar comments
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: c904596f-ba0f-41aa-821c-1068e31bee97

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: c904596f-ba0f-41aa-821c-1068e31bee97

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: c904596f-ba0f-41aa-821c-1068e31bee97

Sorry for the inconvenience!

@abatishchev
Copy link
Copy Markdown
Member

@copilot try again to address all prior comments

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 77adbe2a-c316-4395-b95d-c6197a0f013c

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: c904596f-ba0f-41aa-821c-1068e31bee97

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 77adbe2a-c316-4395-b95d-c6197a0f013c

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: c904596f-ba0f-41aa-821c-1068e31bee97

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 77adbe2a-c316-4395-b95d-c6197a0f013c

Sorry for the inconvenience!

3 similar comments
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 77adbe2a-c316-4395-b95d-c6197a0f013c

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 77adbe2a-c316-4395-b95d-c6197a0f013c

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@abatishchev Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 77adbe2a-c316-4395-b95d-c6197a0f013c

Sorry for the inconvenience!

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Repo needs migration to Central Package Management (CPM)

2 participants