Skip to content

Fix all WindowsAIFoundry according to public doc - #539

Merged
Gordon Lam (yeelam-gordon) merged 6 commits into
release/experimentalfrom
user/yeelam/FixSparseWPFSample
Nov 12, 2025
Merged

Fix all WindowsAIFoundry according to public doc#539
Gordon Lam (yeelam-gordon) merged 6 commits into
release/experimentalfrom
user/yeelam/FixSparseWPFSample

Conversation

@yeelam-gordon

@yeelam-gordon Gordon Lam (yeelam-gordon) commented Sep 28, 2025

Copy link
Copy Markdown
Contributor

Description

According to https://learn.microsoft.com/en-us/windows/ai/apis/get-started?tabs=winget%2Cwinui%2Cwinui2, there are multiple changes before the AI API can be used.
This pull request updates the Windows AI Foundry samples to support new system AI model capabilities and aligns the app manifest with the latest Windows versions. The most important changes are grouped below:

Manifest and capability updates:

  • Added the systemAIModels capability to all relevant AppxManifest.xml and Package.appxmanifest files, enabling access to system AI models in sample applications. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated TargetDeviceFamily MaxVersionTested to 10.0.26226.0 in all manifests for improved compatibility with the latest Windows releases. [1] [2] [3] [4]

WinForms sample code refactor (both packaged and sparse):

  • Replaced usage of LanguageModel and text summarization with ImageDescriptionGenerator and image description functionality, including changes to model loading, error handling, and UI text. [1] [2] [3] [4] [5] [6]

Project and build improvements:

  • Added a global.json specifying .NET SDK version 8.0.100 and MSBuild SDKs for Maui sample to ensure build consistency.
  • Updated WinForms packaged project properties to prevent manifest version replacement for OS min/max versions.
  • Added troubleshooting note to Maui sample README for resolving missing workload errors.<!--
    Thank you for your pull request!

Please see https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/docs/samples-guidelines.md for guidelines on
how to best contribute to the Windows App SDK Samples repository!

-->

Target Release

1.8 and 2.0

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 pull request updates the Windows AI Foundry WPF sample to enable system AI model capabilities by adding the required manifest changes and project configuration updates as specified in the Windows AI documentation.

  • Added systemai namespace and systemAIModels capability to the app manifest
  • Updated MaxVersionTested to 10.0.26226.0 for Windows Insider build compatibility
  • Configured project to prevent automatic OS version replacement in manifest

Reviewed Changes

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

File Description
WindowsAISampleForWPFSparse.csproj Added properties to disable automatic manifest OS version replacement
AppxManifest.xml Added systemai namespace, systemAIModels capability, and updated MaxVersionTested version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread Samples/WindowsAIFoundry/cs-wpf-sparse/WindowsAISampleForWPF/AppxManifest.xml Outdated
@yeelam-gordon Gordon Lam (yeelam-gordon) changed the title Fix one of the sparse app (WPF) according to public doc Fix all WindowsAIFoundry according to public doc Nov 11, 2025

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

Copilot reviewed 19 out of 19 changed files in this pull request and generated 13 comments.


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

Comment thread Samples/WindowsAIFoundry/cs-wpf/WindowsAISampleForWPF/MainWindow.xaml.cs Outdated
Comment thread Samples/WindowsAIFoundry/cs-wpf/WindowsAISampleForWPF/MainWindow.xaml.cs Outdated
Comment thread Samples/WindowsAIFoundry/cs-wpf-sparse/WindowsAISampleForWPF/MainWindow.xaml.cs Outdated
Comment thread Samples/WindowsAIFoundry/cs-wpf-sparse/WindowsAISampleForWPF/MainWindow.xaml.cs Outdated
Comment thread Samples/WindowsAIFoundry/cs-wpf-dotnet/WindowsAISampleForWPF/MainWindow.xaml.cs Outdated
Comment thread Samples/WindowsAIFoundry/cs-wpf-dotnet/WindowsAISampleForWPF/Package.appxmanifest Outdated
@yeelam-gordon
Gordon Lam (yeelam-gordon) merged commit 08b6f95 into release/experimental Nov 12, 2025
4 checks passed
@yeelam-gordon
Gordon Lam (yeelam-gordon) deleted the user/yeelam/FixSparseWPFSample branch November 12, 2025 10:40
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