Skip to content

Fix NU1605 package downgrade error for FluentValidation#10

Merged
aliaksandrzianevich merged 2 commits intomainfrom
copilot/update-fluentvalidation-version
Dec 9, 2025
Merged

Fix NU1605 package downgrade error for FluentValidation#10
aliaksandrzianevich merged 2 commits intomainfrom
copilot/update-fluentvalidation-version

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

Description

CI failing with NU1605 due to FluentValidation version conflict: Core project referenced 11.9.0 while Contracts required ≥11.12.0, causing package downgrade during restore.

Changes:

  • snglrtycrvtureofspce.Core.csproj: Upgraded FluentValidation 11.9.0 → 11.12.0
  • snglrtycrvtureofspce.Core.Samples.BasicApi.csproj: Added explicit FluentValidation 11.12.0 reference

All projects now resolve to FluentValidation 11.12.0, eliminating the dependency conflict.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional Notes

Reference: Job 57505309974, commit fdaff8a

Original prompt

Job 57505309974 failed with NU1605 (WarningAsError): Detected package downgrade of FluentValidation from 11.12.0 to 11.9.0 (see run ref fdaff8a). Logs show the failure during dotnet restore where snglrtycrvtureofspce.Core transitively references FluentValidation 11.9.0 while snglrtycrvtureofspce.Core.Contracts requires >=11.12.0.

Goal: Create a PR that resolves the version mismatch by standardizing FluentValidation to 11.12.0 across projects in the repo so restore/build no longer fails with NU1605.

Changes to make (apply to ref fdaff8a):

  1. Update src/snglrtycrvtureofspce.Core/snglrtycrvtureofspce.Core.csproj
  • Replace the existing FluentValidation PackageReference Version="11.9.0" with Version="11.12.0".

Patch to apply (XML snippet):


(Place/update inside the existing ItemGroup of PackageReferences; keep other PackageReference entries unchanged.)

Reference: https://github.com/snglrtycrvtureofspce/snglrtycrvtureofspce.Core/blob/fdaff8a372cdf951ba482e54aad8aba4b602c853/src/snglrtycrvtureofspce.Core/snglrtycrvtureofspce.Core.csproj

  1. Add explicit FluentValidation reference to src/snglrtycrvtureofspce.Core/snglrtycrvtureofspce.Core.Contracts/snglrtycrvtureofspce.Core.Contracts.csproj if not present
  • Add an ItemGroup with PackageReference Include="FluentValidation" Version="11.12.0" to ensure the Contracts project resolves to 11.12.0 explicitly (this forces a consistent graph).

Patch to apply (XML snippet):


Reference: https://github.com/snglrtycrvtureofspce/snglrtycrvtureofspce.Core/blob/fdaff8a372cdf951ba482e54aad8aba4b602c853/src/snglrtycrvtureofspce.Core.Contracts/snglrtycrvtureofspce.Core.Contracts.csproj

  1. Add explicit FluentValidation reference to samples/snglrtycrvtureofspce.Core.Samples.BasicApi/snglrtycrvtureofspce.Core.Samples.BasicApi.csproj
  • Add an ItemGroup with PackageReference Include="FluentValidation" Version="11.12.0" to the sample project so transitive resolution uses 11.12.0.

Patch to apply (XML snippet):


Reference: https://github.com/snglrtycrvtureofspce/snglrtycrvtureofspce.Core/blob/fdaff8a372cdf951ba482e54aad8aba4b602c853/samples/snglrtycrvtureofspce.Core.Samples.BasicApi/snglrtycrvtureofspce.Core.Samples.BasicApi.csproj

Notes and rationale:

  • The restore failure is caused by conflicting FluentValidation versions; upgrading all direct references to 11.12.0 makes the dependency graph consistent and avoids NU1605 (treated as error).
  • If this repo uses centralized package management (Directory.Packages.props), consider updating that file instead; however this PR applies minimal changes to the three affected project files to fix the CI quickly.
  • Do not remove TreatWarningsAsErrors; we should prefer deterministic package versions.

Please create a branch, apply these edits, run dotnet restore/build locally (CI will verify), and open a PR with a short description: "Fix: Upgrade FluentValidation to 11.12.0 across projects to resolve NU1605 downgrade". Include in the PR body the CI failure reference: job 57505309974 and ref fdaff8a.

This pull request was created as a result of the following prompt from Copilot chat.

Job 57505309974 failed with NU1605 (WarningAsError): Detected package downgrade of FluentValidation from 11.12.0 to 11.9.0 (see run ref fdaff8a). Logs show the failure during dotnet restore where snglrtycrvtureofspce.Core transitively references FluentValidation 11.9.0 while snglrtycrvtureofspce.Core.Contracts requires >=11.12.0.

Goal: Create a PR that resolves the version mismatch by standardizing FluentValidation to 11.12.0 across projects in the repo so restore/build no longer fails with NU1605.

Changes to make (apply to ref fdaff8a):

  1. Update src/snglrtycrvtureofspce.Core/snglrtycrvtureofspce.Core.csproj
  • Replace the existing FluentValidation PackageReference Version="11.9.0" with Version="11.12.0".

Patch to apply (XML snippet):


(Place/update inside the existing ItemGroup of PackageReferences; keep other PackageReference entries unchanged.)

Reference: https://github.com/snglrtycrvtureofspce/snglrtycrvtureofspce.Core/blob/fdaff8a372cdf951ba482e54aad8aba4b602c853/src/snglrtycrvtureofspce.Core/snglrtycrvtureofspce.Core.csproj

  1. Add explicit FluentValidation reference to src/snglrtycrvtureofspce.Core/snglrtycrvtureofspce.Core.Contracts/snglrtycrvtureofspce.Core.Contracts.csproj if not present
  • Add an ItemGroup with PackageReference Include="FluentValidation" Version="11.12.0" to ensure the Contracts project resolves to 11.12.0 explicitly (this forces a consistent graph).

Patch to apply (XML snippet):


Reference: https://github.com/snglrtycrvtureofspce/snglrtycrvtureofspce.Core/blob/fdaff8a372cdf951ba482e54aad8aba4b602c853/src/snglrtycrvtureofspce.Core.Contracts/snglrtycrvtureofspce.Core.Contracts.csproj

  1. Add explicit FluentValidation reference to samples/snglrtycrvtureofspce.Core.Samples.BasicApi/snglrtycrvtureofspce.Core.Samples.BasicApi.csproj
  • Add an ItemGroup with PackageReference Include="FluentValidation" Version="11.12.0" to the sample project so transitive resolution uses 11.12.0.

Patch to apply (XML snippet):


Reference: https://github.com/snglrtycrvtureofspce/snglrtycrvtureofspce.Core/blob/fdaff8a372cdf951ba482e54aad8aba4b602c853/samples/snglrtycrvtureofspce.Core.Samples.BasicApi/snglrtycrvtureofspce.Core.Samples.BasicApi.csproj

Notes and rationale:

  • The restore failure is caused by conflicting FluentValidation versions; upgrading all direct references to 11.12.0 makes the dependency graph consistent and avoids NU1605 (treated as error).
  • If this repo uses centralized package management (Directory.Packages.props), consider updating that file instead; however this PR applies minimal changes to the three affected project files to fix the CI quickly.
  • Do not remove TreatWarningsAsErrors; we should prefer deterministic package versions.

Please create a branch, apply these edits, run dotnet restore/build locally (CI will verify), and open a PR with a short description: "Fix: Upgrade FluentValidation to 11.12.0 across projects to resolve NU1605 downgrade". Include in the PR body the CI failure reference: job 57505309974 and ref fdaff8a.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: snglrtycrvtureofspce <51172121+snglrtycrvtureofspce@users.noreply.github.com>
Copilot AI changed the title [WIP] Update FluentValidation to version 11.12.0 to resolve downgrade issue Fix NU1605 package downgrade error for FluentValidation Dec 9, 2025
@aliaksandrzianevich aliaksandrzianevich marked this pull request as ready for review December 9, 2025 03:34
@aliaksandrzianevich aliaksandrzianevich merged commit 6cfbeb3 into main Dec 9, 2025
5 checks passed
@aliaksandrzianevich aliaksandrzianevich deleted the copilot/update-fluentvalidation-version branch December 9, 2025 03:35
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.

2 participants