Skip to content

fix(samples): acme-retail-agent builds again (stale Microsoft.Agents.AI pin) - #209

Open
jchable wants to merge 1 commit into
devfrom
fix/acme-retail-agent-package-pin
Open

jchable wants to merge 1 commit into
devfrom
fix/acme-retail-agent-package-pin

Conversation

@jchable

@jchable jchable commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Problem

samples/acme-retail-agent does not build on dev:

error NU1605: Detected package downgrade: Microsoft.Agents.AI from 1.24.0 to 1.20.0.
  AcmeRetailAgent -> OKF4net.Agents -> Microsoft.Agents.AI (>= 1.24.0)
  AcmeRetailAgent -> Microsoft.Agents.AI (>= 1.20.0)

Cause

src/OKF4net.Agents was bumped to Microsoft.Agents.AI 1.24.0 (#190); the sample kept its own explicit pin at 1.20.0. Samples have their own solutions and are outside OKF4net.sln/CI, so nothing caught it.

Fix

Removed the redundant explicit Microsoft.Agents.AI PackageReference from the sample's csproj. The sample references OKF4net.Agents by ProjectReference, so the package (and the Microsoft.Agents.AI namespace used in Program.cs) flows transitively at the version the library requires, with no second pin to keep in sync. Microsoft.Extensions.AI.OpenAI stays (the sample uses OpenAI types directly). Added a ### Fixed entry under [Unreleased] (earlier sample fixes are listed there).

Built (dotnet build, 0 warnings, 0 errors)

  • samples/acme-retail-agent: was failing, now OK
  • samples/agents-quickstart: OK (unchanged)
  • samples/attestation-containers-demo: OK (unchanged)
  • samples/catalog-explorer: OK (unchanged)
  • producers/OkfProducer.sln: OK (unchanged)
  • OKF4net.sln: 0 warnings, 0 errors; dotnet format --verify-no-changes clean
  • No sample has a test project; producer tests not run.

🤖 Generated with Claude Code

….20.0 pin

The explicit PackageReference sat below the 1.24.0 that OKF4net.Agents
requires (NU1605). The version now flows from the OKF4net.Agents
ProjectReference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 05:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The existing project reference supplies the required dependency transitively, with no unresolved issues identified.

No open issues 🎉

What changed in this PR

Fixes the acme-retail-agent sample’s dependency downgrade error after the library update in #190.

Changes:

  • Removes the stale Microsoft.Agents.AI pin so the sample inherits the library’s dependency transitively.
  • Documents the fix under Unreleased.
File Description
samples/​acme-retail-agent/​src/​AcmeRetailAgent/​AcmeRetailAgent.csproj Removes the redundant package reference.
CHANGELOG.md Records the sample build fix.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

3 participants