Skip to content

.NET: Samples fix#4932

Merged
westey-m merged 1 commit intomicrosoft:mainfrom
westey-m:samples-fix-2026-03-26
Mar 26, 2026
Merged

.NET: Samples fix#4932
westey-m merged 1 commit intomicrosoft:mainfrom
westey-m:samples-fix-2026-03-26

Conversation

@westey-m
Copy link
Copy Markdown
Contributor

Motivation and Context

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings March 26, 2026 15:19
@github-actions github-actions bot changed the title Samples fix .NET: Samples fix Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes .NET samples related to image inputs and conversation history parsing to make them more reliable and self-contained when run locally.

Changes:

  • Fix image asset path casing in the FoundryAgents “UsingImages” sample to match the on-disk Assets/ folder.
  • Update the Azure OpenAI “UsingImages” sample to load a local image asset (and add/copy the asset via the project file).
  • Make the OpenAI Conversations “Conversation” sample more robust by skipping non-message items and safely handling missing content/text fields.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dotnet/samples/02-agents/FoundryAgents/FoundryAgents_Step10_UsingImages/Program.cs Fixes the image path to Assets/walkway.jpg to match the folder name.
dotnet/samples/02-agents/Agents/Agent_Step08_UsingImages/Program.cs Switches from a remote image URI to loading a local Assets/walkway.jpg.
dotnet/samples/02-agents/Agents/Agent_Step08_UsingImages/Assets/walkway.jpg Adds the local image asset used by the sample.
dotnet/samples/02-agents/Agents/Agent_Step08_UsingImages/Agent_Step08_UsingImages.csproj Ensures Assets/walkway.jpg is copied to the output directory.
dotnet/samples/02-agents/AgentWithOpenAI/Agent_OpenAI_Step05_Conversation/Program.cs Avoids exceptions when enumerating conversation items that don’t have role/content/text.

@westey-m westey-m added this pull request to the merge queue Mar 26, 2026
Merged via the queue into microsoft:main with commit 3b8b56e Mar 26, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants