Skip to content

Fix M.E.AI package refs - #6654

Merged
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:fixpackagerefs
Jul 24, 2025
Merged

Fix M.E.AI package refs#6654
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:fixpackagerefs

Conversation

@stephentoub

@stephentoub stephentoub commented Jul 24, 2025

Copy link
Copy Markdown
Member
Microsoft Reviewers: Open in CodeFlow

@stephentoub
stephentoub requested a review from a team as a code owner July 24, 2025 14:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 package references in Microsoft.Extensions.AI libraries by conditionally including certain System package dependencies only when the target framework is not .NET Core App. This optimization leverages the fact that .NET Core App already includes these packages in its base class libraries.

  • Conditionally includes System.* package references only for non-.NET Core App targets
  • Separates unconditional package references from conditional ones using distinct ItemGroup elements
  • Applies consistent pattern across four Microsoft.Extensions.AI library projects

Reviewed Changes

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

File Description
Microsoft.Extensions.AI.csproj Separates System package references into conditional ItemGroup for non-.NET Core App targets
Microsoft.Extensions.AI.OpenAI.csproj Moves System.Memory.Data and System.Text.Json to conditional ItemGroup
Microsoft.Extensions.AI.Ollama.csproj Adds condition to existing ItemGroup for System package references
Microsoft.Extensions.AI.AzureAIInference.csproj Separates System package references into conditional ItemGroup

@github-actions github-actions Bot added the area-ai Microsoft.Extensions.AI libraries label Jul 24, 2025
@stephentoub
stephentoub enabled auto-merge (squash) July 24, 2025 20:53
@stephentoub
stephentoub merged commit 5610f26 into dotnet:main Jul 24, 2025
6 checks passed
@sebastienros

Copy link
Copy Markdown
Member

This PR seems to be the reason the main branch builds are broken on SourceIndexStage1 job.

https://dev.azure.com/dnceng/internal/_build/results?buildId=2757536&view=logs&j=316d5c15-0c50-544e-8051-e6b14a1ab674&t=4e01507e-10cc-507d-f6d0-adc59e92bcb8

@stephentoub
stephentoub deleted the fixpackagerefs branch July 25, 2025 16:11
@stephentoub

Copy link
Copy Markdown
Member Author

This PR seems to be the reason the main branch builds are broken on SourceIndexStage1 job.

https://dev.azure.com/dnceng/internal/_build/results?buildId=2757536&view=logs&j=316d5c15-0c50-544e-8051-e6b14a1ab674&t=4e01507e-10cc-507d-f6d0-adc59e92bcb8

I'm having trouble deciphering the dependency output there. @ericstj, it looks like something is referencing STJ 6.0 and S.D.DiagnosticSource 6.0 packages and that's causing a conflict?

@sebastienros

Copy link
Copy Markdown
Member

@joperezr said he would take a look at it

@ericstj

ericstj commented Jul 25, 2025

Copy link
Copy Markdown
Member

Something weird about the build of https://github.com/dotnet/extensions/blob/main/src/Packages/Microsoft.Internal.Extensions.DotNetApiDocs.Transport/Microsoft.Internal.Extensions.DotNetApiDocs.Transport.proj

I would expect it to get the latest System.Diagnostics.DiagnosticSource which is brought in transitively by the projects it references, but instead it's getting an older version.

Something fishy with how that project is set up. I see @joperezr already worked around a similar bug before 424e974

@stephentoub

Copy link
Copy Markdown
Member Author

@sebastienros / @joperezr , did this get resolved?

@sebastienros

Copy link
Copy Markdown
Member

From what I see, not resolved

This was referenced Aug 27, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ai Microsoft.Extensions.AI libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants