Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9f95bdf
Fix break on Foundation PR builds: restore original build behavior by…
DinahK-2SO Jun 10, 2026
78ae54d
Bump to latest majors (#6550)
lauren-ciha Jun 11, 2026
5c22efb
Fix focus not restored after Storage Pickers dialog closes (#6544)
DinahK-2SO Jun 11, 2026
b82d6c3
Fix UniversalBGTask crash and gracefully handle CoCreateInstance fail…
godlytalias Jun 12, 2026
b7f32e9
Fix bad regkey path for ApplicationData.GetForUnpackaged().LocalSetti…
DrusTheAxe Jun 12, 2026
0481ada
Replace `partial` variable syntax with fields in MVVM template to sup…
lauren-ciha Jun 16, 2026
eb11b09
MSIX FindPackageFile*() API (#6200)
DrusTheAxe Jun 16, 2026
e858676
Update dependencies from https://dev.azure.com/microsoft/ProjectReuni…
dotnet-maestro[bot] Jun 19, 2026
3801d2d
Add ability to specify Windows App SDK version in C# dotnet and VSIX …
lauren-ciha Jun 22, 2026
c2e7306
Fix GITHUB_TOKEN leak in github-artifacts MCP helper (#6578)
yeelam-gordon Jun 23, 2026
10c13c5
Update spec tempalte (#6582)
JesseCol Jul 2, 2026
d8388d3
Require Templates PR pipeline via internal dev/Templates path gate (#…
DinahK-2SO Jul 6, 2026
21d99b7
Specs: Add EnergySaverStatus2 API spec (#6484)
RuthNjeri Jul 6, 2026
94cdcf7
Add WinUI StoragePickersTestApp and align WebView2 toolset dependency…
DinahK-2SO Jul 7, 2026
6aba17a
Remove the NuGetPackageInstaller wizard from the C# templates (#6583)
lauren-ciha Jul 9, 2026
91160b0
Fix MrmGetFilePathFromName to return S_OK with a valid fallback path …
Scottj1s Jul 10, 2026
aa197a5
Fix MICROSOFT_WINDOWSAPPRUNTIME_BASE_DIRECTORY leaking to child proce…
Scottj1s Jul 14, 2026
c046292
Pin BuildVSIX to .NET SDK 10.0.110 (#6624)
vineeththomasalex Jul 16, 2026
37de565
Fix CS0234 in BaseDirectory auto-initializer: qualify System.Globaliz…
v-arlysenko Jul 17, 2026
ab866b6
[main] Update dependencies from microsoft/LiftedIXP/DCPP (#6532)
dotnet-maestro[bot] Jul 17, 2026
c6d00b5
Add Content Dialog item template to C# VSIX (#6607)
lauren-ciha Jul 22, 2026
1b1198f
FI: main -> release/dev/monobuild (2026-07-23)
kythant Jul 23, 2026
7873a57
Bump DCPP-dep fallbacks to the July-13 train (fixes Containment v2 C2…
kythant Jul 24, 2026
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:

steps:
- name: checkout project
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: setup msbuild
uses: microsoft/setup-msbuild@v1
uses: microsoft/setup-msbuild@v3

- name: setup nuget
uses: NuGet/setup-nuget@v1.0.2
uses: NuGet/setup-nuget@v4

- name: restore project packages
run: nuget restore WindowsAppRuntime.sln
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
*.userosscache
*.sln.docstates

# Backup files
*.[Bb][Aa][Kk]

# full nuget directory
[Bb]uild/FullNuget

Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
otherwise falls back to the pinned version literal. -->
<PropertyGroup Label="WindowsAppSDK Package Version Properties">
<MicrosoftWindowsAppSDKBasePackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '2.0.6-dev.experimental1'))</MicrosoftWindowsAppSDKBasePackageVersion>
<MicrosoftFrameworkUdkPackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '3.0.0-experimental-27300.1878.260525-0800.0'))</MicrosoftFrameworkUdkPackageVersion>
<MicrosoftProjectReunionInteractiveExperiencesTransportPackagePackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '3.0.0-experimental-27300.1878.260525-0800.0'))</MicrosoftProjectReunionInteractiveExperiencesTransportPackagePackageVersion>
<MicrosoftWindowsAppSDKInteractiveExperiencesPackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '3.0.0-experimental-Rolling.20260525.1'))</MicrosoftWindowsAppSDKInteractiveExperiencesPackageVersion>
<MicrosoftFrameworkUdkPackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '3.0.0-experimental-27300.1896.260713-1015.0'))</MicrosoftFrameworkUdkPackageVersion>
<MicrosoftProjectReunionInteractiveExperiencesTransportPackagePackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '3.0.0-experimental-27300.1896.260713-1015.0'))</MicrosoftProjectReunionInteractiveExperiencesTransportPackagePackageVersion>
<MicrosoftWindowsAppSDKInteractiveExperiencesPackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '3.0.0-experimental-Rolling.20260713.2'))</MicrosoftWindowsAppSDKInteractiveExperiencesPackageVersion>
<MicrosoftWindowsAppSDKAppLicensingInternalTransportPackagePackageVersion>$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', '1.7.0-main.20241009.0'))</MicrosoftWindowsAppSDKAppLicensingInternalTransportPackagePackageVersion>
</PropertyGroup>

Expand Down
192 changes: 192 additions & 0 deletions WindowsAppRuntime.sln

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ parameters:
default: true
- name: UseCurrentBuild
type: boolean
default: false
default: false
# When true, this template is being invoked from the monobuild context where
# the WindowsAppSDK monorepo IS the self repo. PublishSymbol-Steps is invoked
# WITHOUT the @WinAppSDK suffix.
- name: IsMonobuild
type: boolean
default: false
# To override OptionalVSIXVersion's default, add
# OptionalVSIXVersion: 'x.y.z' to the parameters of
# the stage that calls this template in the aggregator pipeline.
- name: OptionalVSIXVersion
# if blank, the project template will select the version matching the Windows App SDK
# nuget. If provided, it should be a 4-part dotted version ('1.2.3.4')
type: string
default: 'default'
- name: EnableExperimentalVSIXFeatures
Expand Down Expand Up @@ -129,6 +130,12 @@ steps:
}
Exit 1

- task: UseDotNet@2
displayName: 'Use .NET SDK 10.0.110'
inputs:
packageType: 'sdk'
version: '10.0.110'

- task: NuGetAuthenticate@1

- task: VSBuild@1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@ parameters:
- name: IsPRBuild
type: boolean
default: false
# Optional gate wiring used by the PR pipeline to short-circuit when no
# dev/Templates files changed. Defaults preserve official-pipeline behavior.
- name: dependsOn
type: object
default: []
- name: condition
type: string
default: ''

stages:
- stage: DotnetNewTemplates_Build
displayName: 'Build and pack dotnet new templates'
dependsOn: []
dependsOn: ${{ parameters.dependsOn }}
${{ if ne(parameters.condition, '') }}:
condition: ${{ parameters.condition }}
jobs:
- job: PackDotnetNewTemplates
displayName: 'Pack dotnet new template NuGet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,27 @@ parameters:
- name: dotnetSdkVersion
type: string
default: '8.0.x'
- name: WindowsAppSdkVersion
type: string
default: '*'
# Optional gate wiring used by the PR pipeline to short-circuit when no
# dev/Templates files changed. Defaults preserve official-pipeline behavior.
- name: dependsOn
type: object
default: []
- name: condition
type: string
default: ''

stages:
- stage: DotnetNewTemplates_Test
displayName: 'Smoke-test dotnet new templates'
dependsOn:
- ${{ parameters.dependsOnStage }}
- ${{ each s in parameters.dependsOn }}:
- ${{ s }}
${{ if ne(parameters.condition, '') }}:
condition: ${{ parameters.condition }}
jobs:
- job: TestDotnetNewTemplates
displayName: 'Scaffold and build dotnet new templates'
Expand Down Expand Up @@ -71,4 +86,9 @@ stages:
& '$(Build.SourcesDirectory)\${{ parameters.sourceSubdirectory }}\dev\Templates\Dotnet\Test-DotnetNewTemplates.ps1' `
-PackagePath $package.FullName `
-Platforms $platforms `
-WindowsAppSdkVersion '${{ parameters.WindowsAppSdkVersion }}' `
-SkipAppLaunch
env:
# Lets the smoke test read the latest official WindowsAppSDK version from
# the package source when the version is '*'.
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,21 @@ parameters:
type: object
default:
type: windows
# Optional gate wiring used by the PR pipeline to short-circuit when no
# dev/Templates files changed. Defaults preserve official-pipeline behavior.
- name: dependsOn
type: object
default: []
- name: condition
type: string
default: ''

stages:
- stage: VSIXTemplates_BuildValidation
displayName: 'Validate VSIX templates build'
dependsOn: []
dependsOn: ${{ parameters.dependsOn }}
${{ if ne(parameters.condition, '') }}:
condition: ${{ parameters.condition }}
jobs:
- job: BuildVSIX
displayName: 'Restore + build WindowsAppSDK.Extension.sln (Standalone + Component)'
Expand Down Expand Up @@ -74,6 +84,7 @@ stages:
runStaticAnalysis: false
PublishSymbols: false
UseCurrentBuild: false
UseLatestNightlyFromBranch: true
IsOfficial: false
OptionalVSIXVersion: '$(OptionalVSIXVersion)'

Expand Down
1 change: 1 addition & 0 deletions build/CopyFilesToStagingDir.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_UniversalBGTaskDLL\Microsoft.Wind
# Common Auto-Initializer Files
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeAutoInitializer.cpp $NugetDir\include
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeAutoInitializer.cs $NugetDir\include
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeBaseDirectoryAutoInitializer.cs $NugetDir\include
#
# Bootstrap Auto-Initializer Files
PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp $NugetDir\include
Expand Down
4 changes: 4 additions & 0 deletions build/NuSpecs/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependencyContext" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependencyRank" ThreadingModel="both" />

<!-- Package -->
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.Package" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.PackageGraph" ThreadingModel="both" />

<!-- WinAppSDK Deployment -->
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManager" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentResult" ThreadingModel="both" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
<DefineConstants Condition="'$(WindowsAppSdkBootstrapInitialize)'=='true'">$(DefineConstants);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_BOOTSTRAP</DefineConstants>
<DefineConstants Condition="'$(WindowsAppSdkDeploymentManagerInitialize)'=='true'">$(DefineConstants);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_DEPLOYMENTMANAGER</DefineConstants>
<DefineConstants Condition="'$(WindowsAppSdkUndockedRegFreeWinRTInitialize)'=='true'">$(DefineConstants);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_UNDOCKEDREGFREEWINRT</DefineConstants>
<!-- The resource base directory (%MICROSOFT_WINDOWSAPPRUNTIME_BASE_DIRECTORY%, used by the app
manifest's SxS DLL redirection and by MRTCore) is published for self-contained apps. It shares
the self-contained trigger with undocked reg-free WinRT initialization. See issue #5987. -->
<DefineConstants Condition="'$(WindowsAppSdkUndockedRegFreeWinRTInitialize)'=='true'">$(DefineConstants);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_BASEDIRECTORY</DefineConstants>
<DefineConstants Condition="'$(WindowsAppSdkCompatibilityInitialize)'=='true'">$(DefineConstants);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_COMPATIBILITY</DefineConstants>
</PropertyGroup>

<!-- "BeforeCompile" is used here to ensure this happens at the same time as possible codegen from WindowsAppSdkCompatibilitySetterTarget -->
<Target Name="WindowsAppRuntimeAutoInitializer" BeforeTargets="BeforeCompile">
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\include\WindowsAppRuntimeAutoInitializer.cs" />
<Compile Condition="'$(WindowsAppSdkUndockedRegFreeWinRTInitialize)'=='true'" Include="$(MSBuildThisFileDirectory)..\include\WindowsAppRuntimeBaseDirectoryAutoInitializer.cs" />
</ItemGroup>
</Target>

Expand Down
82 changes: 73 additions & 9 deletions build/WindowsAppSDK-Templates-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@
# published. PR-stamped versions keep PR artifacts from colliding with
# canonical packages -- see each stage for the exact format.
#
# Triggers are configured in the Azure DevOps UI (Edit pipeline -> Triggers),
# NOT in this YAML -- matches the WindowsAppSDK-Foundation-PR.yml convention.
# In the UI, under Pull request validation:
# - Override the YAML pull request trigger from here: ON
# - Enable pull request validation: ON
# - Branch filters: Include refs/heads/main
# Include refs/heads/release/*
# - Path filters: Include dev/Templates/**
# Triggered via the existing "/azp run" comment, same as TransportPackage-Foundation-PR.
# Stays its own independent pipeline; "/azp run" just fans out to every PR-enabled
# pipeline. To be a required GitHub check, it must report on EVERY PR -- so there is
# NO path filter. Instead the EvaluateTemplatesPaths gate below diffs against the PR
# target branch and, when nothing under dev/Templates/** changed, skips the heavy
# build/test/VSIX stages and reports a fast success. Configure only branch filters
# (refs/heads/main, refs/heads/release/*) in the ADO UI; do NOT add a path filter.

trigger: none

parameters:
- name: WindowsAppSDKVersion
displayName: 'WindowsAppSDK version for template validation (* = latest stable)'
type: string
default: '*'

# Shared variable templates:
# - Foundation-TestConfig: test matrices reused from the main pipeline.
# - Versions: MajorVersion / MinorVersion / PatchVersion (consumed by CommonVariables).
Expand Down Expand Up @@ -85,6 +90,58 @@ extends:
enabled: false

stages:
# Gate: only do real work when this PR touched dev/Templates/**. Diffs against
# the PR target branch; manual/non-PR runs default to true so they still build.
# The downstream stages condition on this output, so non-Templates PRs get a
# fast success and the required check is always reported.
- stage: EvaluateTemplatesPaths
displayName: 'Detect dev/Templates changes'
dependsOn: []
jobs:
- job: Evaluate
pool:
type: windows
variables:
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)\evaluate'
steps:
- checkout: self
fetchDepth: 0
- task: PowerShell@2
name: detect
displayName: 'Detect dev/Templates changes'
inputs:
targetType: inline
workingDirectory: '$(Build.SourcesDirectory)'
script: |
# The repo is checked out under a WindowsAppSDK subfolder
# (1ES convention, matching the other Templates stages which
# all reference $(Build.SourcesDirectory)\WindowsAppSDK). The
# task cwd is not the repo root, so point git at it with -C.
#
# git writes normal progress (e.g. "From https://github.com/...")
# to stderr even on success, so keep ErrorActionPreference at
# Continue -- otherwise that stderr becomes a terminating
# NativeCommandError. Fail-fast is enforced via $LASTEXITCODE +
# throw, so a real git failure still turns the gate red.
$ErrorActionPreference = 'Continue'
$repo = Join-Path $env:BUILD_SOURCESDIRECTORY 'WindowsAppSDK'
Write-Host "Using repo: $repo"

# Non-PR runs (manual queue) build everything.
$changed = 'True'
if ($env:BUILD_REASON -eq 'PullRequest') {
$target = $env:SYSTEM_PULLREQUEST_TARGETBRANCH
$fetchOut = git -C $repo fetch --no-tags origin $target 2>&1
if ($LASTEXITCODE -ne 0) { throw "git fetch failed (exit $LASTEXITCODE) for target '$target': $fetchOut" }
$files = git -C $repo diff --name-only FETCH_HEAD HEAD 2>&1
if ($LASTEXITCODE -ne 0) { throw "git diff failed (exit $LASTEXITCODE): $files" }
$hit = $files | Where-Object { $_ -like 'dev/Templates/*' }
$changed = if ($hit) { 'True' } else { 'False' }
}
Write-Host "templatesChanged=$changed"
Write-Host "##vso[task.setvariable variable=templatesChanged;isOutput=true]$changed"
exit 0

# Build + pack the templates NuGet. IsPRBuild=true makes the stage stamp
# every pack as <csproj-Version>-<yyyy>-<MMdd>-<HHmm>-pr<PR# or 0> so the
# .nupkg filename uniquely identifies the run (manual replays without a
Expand All @@ -96,18 +153,25 @@ extends:
publishToInternalFeed: false
SignOutput: false
IsPRBuild: true
dependsOn: [EvaluateTemplatesPaths]
condition: eq(dependencies.EvaluateTemplatesPaths.outputs['Evaluate.detect.templatesChanged'], 'True')

# Smoke-test: scaffold every template from the pack and dotnet build each.
- template: AzurePipelinesTemplates\WindowsAppSDK-DotnetNewTemplates-Test-Stage.yml@self
parameters:
pool:
type: windows
dependsOnStage: 'DotnetNewTemplates_Build'
dependsOn: [EvaluateTemplatesPaths]
condition: eq(dependencies.EvaluateTemplatesPaths.outputs['Evaluate.detect.templatesChanged'], 'True')
WindowsAppSdkVersion: ${{ parameters.WindowsAppSDKVersion }}

# Build-validate the VSIX. Runs the production VSIX pack steps so
# VSIX-pack regressions (e.g. VSSDK1300 path overflow) surface at PR
# time. See WindowsAppSDK-VSIXTemplates-BuildValidation-Stage.yml.
- template: AzurePipelinesTemplates\WindowsAppSDK-VSIXTemplates-BuildValidation-Stage.yml@self
parameters:
pool:
type: windows
type: windows
dependsOn: [EvaluateTemplatesPaths]
condition: eq(dependencies.EvaluateTemplatesPaths.outputs['Evaluate.detect.templatesChanged'], 'True')
4 changes: 2 additions & 2 deletions dev/ApplicationData/UnpackagedApplicationData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ namespace winrt::Microsoft::Windows::Storage::implementation

wil::unique_hkey currentUserKey;
THROW_IF_WIN32_ERROR(::RegOpenCurrentUser(KEY_READ | KEY_WRITE, currentUserKey.put()));
auto subKey{ std::format(L"SOFTWARE\\{}\\{}", m_publisher, m_product) };
auto subKey{ std::format(L"SOFTWARE\\Classes\\Local Settings\\SOFTWARE\\{}\\{}", m_publisher, m_product) };
auto key{ wil::reg::create_shared_key(currentUserKey.get(), subKey.c_str(), wil::reg::key_access::readwrite) };
return winrt::make<UnpackagedApplicationDataContainer>(
std::move(key), winrt::hstring{}, winrt::Microsoft::Windows::Storage::ApplicationDataLocality::Local);
Expand Down Expand Up @@ -223,7 +223,7 @@ namespace winrt::Microsoft::Windows::Storage::implementation
{
wil::unique_hkey currentUserKey;
THROW_IF_WIN32_ERROR(::RegOpenCurrentUser(KEY_READ | KEY_WRITE, currentUserKey.put()));
auto subKey{ std::format(L"SOFTWARE\\{}\\{}", publisher, product) };
auto subKey{ std::format(L"SOFTWARE\\Classes\\Local Settings\\SOFTWARE\\{}\\{}", publisher, product) };
const auto hr{ HRESULT_FROM_WIN32(::RegDeleteTreeW(currentUserKey.get(), subKey.c_str())) };
if (hr != HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) && hr != HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND))
{
Expand Down
Loading