Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## Build and Test

**Solution:** Open `WinUIGallery.sln` in Visual Studio 2022+. Set `WinUIGallery` as the startup project.
**Solution:** Open `WinUIGallery.slnx` in Visual Studio 2022+. Set `WinUIGallery` as the startup project.

```powershell
# Restore and build
dotnet restore WinUIGallery.sln
msbuild WinUIGallery.sln /p:Configuration=Debug /p:Platform=x64
dotnet restore WinUIGallery.slnx
msbuild WinUIGallery.slnx /p:Configuration=Debug /p:Platform=x64

# Run unit tests
dotnet test tests\WinUIGallery.UnitTests\WinUIGallery.UnitTests.csproj
Expand All @@ -27,7 +27,7 @@ This is a **WinUI 3 / Windows App SDK** gallery app that demonstrates controls,

### Project structure

- **WinUIGallery** — Main app (XAML + C#, .NET 8, `net8.0-windows10.0.22621.0`)
- **WinUIGallery** — Main app (XAML + C#, .NET 10, `net10.0-windows10.0.22621.0`)
- **WinUIGallery.SourceGenerator** — Incremental source generator that reads `ControlInfoData.json` at compile time and emits `SamplesNavigationPageMappings.cs` to map control IDs → page types
- **tests/WinUIGallery.UnitTests** — MSTest v3 unit tests (runs in WinUI context)
- **tests/WinUIGallery.UITests** — MSTest + Appium UI automation tests with Axe.Windows accessibility checks
Expand Down Expand Up @@ -84,6 +84,17 @@ All new UI must be accessible. The project enforces this through automated Axe.W
- **Meet WCAG color contrast requirements** — the gallery includes a color contrast checker page as a reference.
- New control pages are automatically picked up by `AxeScanAllTests` which navigates to every page and asserts zero accessibility violations.

## Documentation Reference

When looking up API references, control usage, or platform guidance, use the Microsoft Learn MCP server at `https://learn.microsoft.com/en-us/training/support/mcp`. This covers all Windows developer documentation. This project is **WinUI 3 / Windows App SDK** — always prefer WinUI 3 docs over WPF, MAUI, or UWP equivalents.

Key reference repositories:

- **[microsoft/microsoft-ui-xaml](https://github.com/microsoft/microsoft-ui-xaml)** — WinUI 3 source code (controls, theming, input handling)
- **[microsoft/WindowsAppSDK](https://github.com/microsoft/WindowsAppSDK)** — Windows App SDK (app lifecycle, windowing, deployment)
- **[microsoft/WindowsAppSDK-Samples](https://github.com/microsoft/WindowsAppSDK-Samples)** — Official samples demonstrating Windows App SDK features
- **[microsoft/ai-dev-gallery](https://github.com/microsoft/ai-dev-gallery)** — AI Dev Gallery, a WinUI 3 app showcasing on-device AI models and APIs

## Conventions

- **File-scoped namespaces** are enforced (`csharp_style_namespace_declarations = file_scoped`, severity: warning).
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/WinUI-Gallery-OneBranch-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extends:
ob_outputDirectory: $(build.artifactStagingDirectory)
ob_artifactSuffix: _$(buildPlatform)_$(buildConfiguration)

solutionGallery: "**/WinUIGallery.sln"
solutionGallery: "**/WinUIGallery.slnx"
buildPlatform: "x64"
buildConfiguration: "Debug"
appxPackageDir: '$(Build.ArtifactStagingDirectory)\AppxPackages\\'
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pool:
vmImage: "windows-2022"
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pipeline now builds a .slnx, which requires the agent's MSBuild/Visual Studio tooling to understand the new solution format. To avoid CI breaks from older MSBuild versions on windows-2022, consider explicitly selecting/pinning the Visual Studio/MSBuild version (or adding a validation step) that supports building .slnx.

Suggested change
vmImage: "windows-2022"
vmImage: "windows-latest"

Copilot uses AI. Check for mistakes.

variables:
solutionGallery: "**/WinUIGallery.sln"
solutionGallery: "**/WinUIGallery.slnx"
buildPlatform: "x64"
buildConfiguration: "Debug"
appxPackageDir: '$(Build.ArtifactStagingDirectory)\AppxPackages\\'
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
NU1605;
$(NoWarn)
</NoWarn>
<SamplesTargetFrameworkMoniker>net8.0-windows10.0.22621.0</SamplesTargetFrameworkMoniker>
<SamplesTargetFrameworkMoniker>net10.0-windows10.0.22621.0</SamplesTargetFrameworkMoniker>
<WindowsSdkTargetPlatformVersion>10.0.22621.756</WindowsSdkTargetPlatformVersion>
<WindowsAppSdkTargetPlatformVersion>10.0.17763.0</WindowsAppSdkTargetPlatformVersion>
<MicrosoftWindowsSDKBuildToolsNugetPackageVersion>10.0.26100.4948</MicrosoftWindowsSDKBuildToolsNugetPackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Quick start guide to building the WinUI 3 Gallery:
git clone https://github.com/microsoft/WinUI-Gallery.git
```

### 3. Open WinUIGallery.sln with Visual Studio and build!
### 3. Open WinUIGallery.slnx with Visual Studio and build!

Ensure that the `WinUIGallery` project is set as the startup project in Visual Studio.

Expand Down
92 changes: 0 additions & 92 deletions WinUIGallery.DesktopWap.sln

This file was deleted.

22 changes: 22 additions & 0 deletions WinUIGallery.DesktopWap.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Solution>
<Configurations>
<Platform Name="Any CPU" />
<Platform Name="ARM64" />
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>
<Folder Name="/Solution Items/">
<File Path="../Directory.Build.props" />
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as the main solution: ../Directory.Build.props likely points to the parent folder of the repo when the .slnx is at the repo root. Prefer Directory.Build.props (or the correct repo-relative path) so Solution Items loads correctly.

Suggested change
<File Path="../Directory.Build.props" />
<File Path="Directory.Build.props" />

Copilot uses AI. Check for mistakes.
</Folder>
<Project Path="WinUIGallery.SourceGenerator/WinUIGallery.SourceGenerator.csproj" />
<Project Path="WinUIGallery/WinUIGallery.csproj">
<Platform Solution="*|Any CPU" Project="x64" />
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
</Project>
<Project Path="WinUIGallery/WinUIGallery.DesktopWap.Package.wapproj" Type="c7167f0d-bc9f-4e6e-afe1-012c56b48db5">
<Platform Solution="*|Any CPU" Project="x64" />
<Deploy />
</Project>
</Solution>
Loading