Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TUnit.AspNetCore/TUnit.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

<!-- Framework-specific package versions for Microsoft.AspNetCore.Mvc.Testing -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" VersionOverride="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.1" VersionOverride="8.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" VersionOverride="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.1" VersionOverride="9.0.0" />
Comment on lines +16 to +20
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

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

The Version attribute has been updated to 10.0.1, but the VersionOverride attribute still specifies the older framework-specific versions (8.0.0 and 9.0.0). This creates a conflict:

  • Line 16: Version="10.0.1" but VersionOverride="8.0.0"
  • Line 20: Version="10.0.1" but VersionOverride="9.0.0"

When Central Package Management (CPM) is enabled, VersionOverride takes precedence and will use the older versions (8.0.0 and 9.0.0), ignoring the Version attribute. When CPM is not enabled, it will attempt to use 10.0.1, which may not be compatible with net8.0 and net9.0 target frameworks.

Additionally, Microsoft.AspNetCore.Mvc.Testing version 10.0.1 is designed for .NET 10.0, not .NET 8.0 or 9.0. ASP.NET Core packages are typically framework-specific - version 8.x is for .NET 8.0, version 9.x is for .NET 9.0, and version 10.x is for .NET 10.0.

The correct approach would be to keep the Version attribute matching the VersionOverride for each target framework, ensuring consistent behavior regardless of CPM usage and maintaining proper framework compatibility.

Copilot uses AI. Check for mistakes.
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
Expand Down
Loading