Skip to content

Fix issues with samples#724

Open
skottmckay wants to merge 3 commits into
mainfrom
skottmckay/FixCsharpSamples
Open

Fix issues with samples#724
skottmckay wants to merge 3 commits into
mainfrom
skottmckay/FixCsharpSamples

Conversation

@skottmckay
Copy link
Copy Markdown
Collaborator

Match Betalgo version to SDK version. Runtime error due to new dependencies in 9.2.0 that reverting to 9.1.0 which matches the SDK fixes.

Fix csproj files. They break the AnyCPU resolution when loaded in VS on an x64 machine due to defaulting to ARM64.

Alternative is to remove the 'Platforms' tag from the csproj files.

Trade-offs of removing :

✅ Simpler — no need for the RID-from-Platform mapping block.
✅ Eliminates the NETSDK1032 footgun entirely.
⚠️ Loses the explicit "this only supports x64/ARM64" signal in VS Configuration Manager. Minor.
⚠️ If anyone was relying on -p:Platform=ARM64 to cross-target ARM64 from an x64 host, that flow now needs -p:RuntimeIdentifier=win-arm64 instead (which is the more correct flag anyway).

…encies in 9.2.0

Fix csproj files. They break the AnyCPU resolution when loaded in VS on an x64 machine due to defaulting to ARM64.
Copilot AI review requested due to automatic review settings May 22, 2026 23:27
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment May 30, 2026 12:17am

Request Review

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

Updates the C# samples to avoid build/runtime breakages by pinning a compatible OpenAI client dependency version and aligning Windows RuntimeIdentifier selection with the chosen Platform to prevent NETSDK1032 conflicts.

Changes:

  • Downgrade Betalgo.Ranul.OpenAI to 9.1.0 to match the C# SDK’s referenced version.
  • Add MSBuild logic in each C# sample project to map Platform (x64/ARM64) to a matching Windows RuntimeIdentifier when none is provided.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
samples/cs/Directory.Packages.props Pins Betalgo.Ranul.OpenAI to 9.1.0 for compatibility with the SDK.
samples/cs/tutorial-voice-to-text/TutorialVoiceToText.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/tutorial-tool-calling/TutorialToolCalling.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/tutorial-document-summarizer/TutorialDocumentSummarizer.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/tutorial-chat-assistant/TutorialChatAssistant.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/tool-calling-foundry-local-web-server/ToolCallingFoundryLocalWebServer.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/tool-calling-foundry-local-sdk/ToolCallingFoundryLocalSdk.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/native-chat-completions/NativeChatCompletions.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/model-management-example/ModelManagementExample.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/live-audio-transcription/LiveAudioTranscriptionExample.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/foundry-local-web-server/FoundryLocalWebServer.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/embeddings/Embeddings.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.
samples/cs/audio-transcription-example/AudioTranscriptionExample.csproj Adds Windows RID-from-Platform mapping to avoid NETSDK1032 conflicts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread samples/cs/tutorial-voice-to-text/TutorialVoiceToText.csproj Outdated
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