Fix issues with samples#724
Open
skottmckay wants to merge 3 commits into
Open
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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.OpenAIto 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 WindowsRuntimeIdentifierwhen 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
⚠️ 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).
✅ Eliminates the NETSDK1032 footgun entirely.