Skip to content

Restrict basic C# sample package source - #576

Open
Akshay Sonawane (apsonawane) wants to merge 3 commits into
mainfrom
msrc/basic-csharp-local-nuget-source
Open

Akshay Sonawane (apsonawane) wants to merge 3 commits into
mainfrom
msrc/basic-csharp-local-nuget-source

Conversation

@apsonawane

@apsonawane Akshay Sonawane (apsonawane) commented Sep 1, 2026 •

Copy link
Copy Markdown

This pull request restricts the C# plugin execution provider sample to an explicit two-source NuGet allowlist.

  • Clears inherited and machine-level package sources.
  • Maps Contoso.ML.OnnxRuntime.EP.Basic exactly to the generated local_feed, so a missing local package cannot fall back to a public package with the same ID.
  • Uses the explicit NuGet.org v3 source for Microsoft.ML.OnnxRuntime and its public dependencies.

This keeps the locally built execution-provider package local while preserving clean restores of the sample's approved public dependencies.

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.

Pull request overview

This PR updates the NuGet package source configuration for the basic C# plugin execution provider sample to ensure restores use only the intended local package feed.

Changes:

  • Clears any inherited/default NuGet package sources in nuget.config.
  • Ensures the only configured source is the explicitly defined local_feed path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

🟡 Changes recommended

Clearing inherited NuGet sources leaves the local feed unable to resolve ONNX Runtime and its dependencies, breaking the sample build on machines without cached packages.

1 open issue

Review effort: Balanced

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.

🔵 Needs a closer look

Clearing inherited NuGet sources leaves no source for required ONNX Runtime dependencies, causing the documented sample build to fail on machines without cached packages.

1 open issue

Review effort: Max

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.

🟡 Changes recommended

The added nuget.org feed lacks source mapping, allowing a missing local execution-provider package to resolve to a matching public package whose native library the sample then loads.

2 open issues
1 resolved since last review

Review effort: Max

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