Skip to content

Add .NET 10 support and update package references - #441

Open
KAJOOSH wants to merge 6 commits into
Sina-Soltani:masterfrom
KAJOOSH:master
Open

Add .NET 10 support and update package references#441
KAJOOSH wants to merge 6 commits into
Sina-Soltani:masterfrom
KAJOOSH:master

Conversation

@KAJOOSH

@KAJOOSH KAJOOSH commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request adds .NET 10 support across the Parbad solution and prepares the packages for the v3.12.0 release.

It updates target frameworks, package references, release metadata, and test projects while preserving compatibility with existing legacy targets. It also adds a dedicated multi-targeted framework compatibility test project to make sure Parbad remains buildable and loadable across the supported .NET runtime matrix.

What changed

.NET 10 support

  • Added net10.0 target framework support across:
    • Parbad core
    • ASP.NET Core integration
    • MVC / OWIN packages
    • Storage packages
    • Gateway packages
    • Test projects

Package reference updates

  • Updated package references where compatible with the existing target framework matrix.
  • Kept legacy netstandard2.0 / netstandard2.1 dependency groups on compatible ASP.NET Core and Microsoft.Extensions package lines to avoid breaking older consumers.
  • Added conditional Entity Framework Core references:
    • Legacy EF Core storage targets continue using the latest compatible EF Core 5.x line.
    • net10.0 targets use EF Core 10.
  • Added direct compatibility/security package overrides for vulnerable transitive dependencies without forcing legacy targets onto modern-only dependency versions.

Test updates

  • Updated test package references.
  • Made previously non-discoverable gateway/core tests executable.
  • Adjusted tests for MSTest 4 behavior and .NET 10 runtime expectations.
  • Fixed .NET 10 build issues in cache and Entity Framework Core storage tests.
  • Replaced obsolete test-helper storage usage where needed.

ASP.NET Core compatibility

  • Updated the virtual gateway middleware environment handling for modern ASP.NET Core targets by using IWebHostEnvironment where appropriate, while keeping compatibility with older hosting abstractions.

Release metadata

  • Bumped package versions for the v3.12.0 release.
  • Updated <PackageReleaseNotes> links in project files to point to the v3.12.0 release notes.
  • These release metadata changes do not introduce functional behavior changes by themselves.

Cross-framework compatibility tests

  • Added a new multi-targeted test project:

    tests/Parbad.FrameworkCompatibility.Tests

  • The new test project targets the supported runtime matrix from netcoreapp3.0 through net10.0.

  • It verifies that:

    • The current executing target framework is part of the expected supported runtime list.
    • Runtime-compatible Parbad assemblies can be loaded successfully for each target.
  • Entity Framework Core storage compatibility checks are included only for net5.0 and later, because that package does not target netcoreapp3.x.

  • Added the new compatibility test project to Parbad.sln so it runs as part of the full solution test suite.

Why

.NET 10 support requires updating target frameworks, package references, test dependencies, and a few compatibility-specific code paths.

The new compatibility test project provides a regression safety net for future framework/package updates, ensuring the declared Parbad runtime support matrix remains buildable and testable.

Validation

The changes were validated with:

dotnet restore Parbad.sln
dotnet build
dotnet test
dotnet test Parbad.sln --no-build --no-restore
dotnet build tests/Parbad.FrameworkCompatibility.Tests/Parbad.FrameworkCompatibility.Tests.csproj --no-restore -v:q
dotnet test tests/Parbad.FrameworkCompatibility.Tests/Parbad.FrameworkCompatibility.Tests.csproj --no-build --no-restore

KAJOOSH added 6 commits May 20, 2026 11:17
Add net10.0 target framework support across Parbad core, ASP.NET Core integration, storage packages, gateway packages, and test projects.

Update package references to current stable versions where compatible, while keeping netstandard2.0/netstandard2.1-specific ASP.NET Core and Microsoft.Extensions dependencies on the 2.2 line to preserve legacy consumer compatibility.

Use conditional EF Core package references so legacy EntityFrameworkCore storage targets stay on the latest compatible 5.0 patch release and net10.0 uses EF Core 10.

Add direct compatibility/security overrides for vulnerable transitive dependencies without moving legacy netstandard dependency groups to modern-only package lines.

Update test package references, make previously non-discoverable gateway/core tests executable, and adjust tests for MSTest 4 behavior and net10.0 runtime expectations.

Fix net10.0 build issues in cache and Entity Framework Core storage tests, use IWebHostEnvironment for modern ASP.NET Core targets, and remove obsolete test-helper storage usage.

Validated with dotnet restore, dotnet build, dotnet test, and vulnerable package checks across all project files.
Bump version numbers across all Parbad projects for the v3.12.0 release. Update <PackageReleaseNotes> URLs in .csproj files to reference the new release notes. No functional or code changes included; metadata only.
Add a single multi-targeted framework compatibility test project that runs against every supported .NET Core runtime target from netcoreapp3.0 through net10.0.

The project acts as one shared test point for runtime compatibility instead of maintaining separate test projects per framework version.

The tests assert that the executing target framework is part of the supported runtime matrix and verify that each runtime-compatible Parbad project assembly can be loaded for that target.

Entity Framework Core storage is included only for net5.0 and later because that package does not target netcoreapp3.x.

Package references are conditioned by target framework so older runtimes use compatible MSTest/Test SDK assets while net8.0 and newer use the current MSTest 4 stack.

The solution file includes the new test project under the existing test solution folder so dotnet test Parbad.sln runs the full compatibility matrix.

Reason: this provides an explicit regression check that future target framework or package updates keep the declared .NET Core support matrix buildable and testable.

Validated with dotnet restore Parbad.sln, dotnet build tests/Parbad.FrameworkCompatibility.Tests/Parbad.FrameworkCompatibility.Tests.csproj --no-restore -v:q, dotnet test tests/Parbad.FrameworkCompatibility.Tests/Parbad.FrameworkCompatibility.Tests.csproj --no-build --no-restore, and dotnet test Parbad.sln --no-build --no-restore.
Upgraded the UseDotNet@2 task in azure-pipelines.yml to use .NET SDK version 10.x instead of 9.x for builds.
Refactored pipeline YAML to use .NET SDK 10.0.x, added .NET SDK info step, and standardized usage of variables. Optimized restore, build, test, and pack steps with '--no-restore' and '--no-build' flags for better efficiency. Improved formatting and task display names for clarity.
Added UseDotNet@2 tasks to install .NET SDKs from 3.0 to 10.0 with explicit installation paths. Enhanced the script step to show detailed SDK and runtime info. Increased test output verbosity by adding --verbosity normal to the test step.
@KAJOOSH

KAJOOSH commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

The reason for updating azure-pipelines.yml was to make the CI environment compatible with the new framework compatibility test project.

This project targets multiple .NET versions, from netcoreapp3.0 up to net10.0, and it is intended to remain part of the test stage. Because of that, the pipeline must install the required .NET SDKs/runtimes before running dotnet test, otherwise the test step may fail even when there are no actual failed test assertions.

The pipeline was also updated to use DotNetCoreCLI@2 for restore/build/test so the installed .NET SDKs are used consistently during the CI process.

After applying these changes, the issue was resolved and Build #20260520.4 completed successfully.

@KAJOOSH

KAJOOSH commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Hello
Is there a problem that it is not approved?
@Sina-Soltani

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant