From f44a6f6b623840b1762dd72184e66ba67ecd5514 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 12 Mar 2026 15:10:41 -0400 Subject: [PATCH 01/41] initial migration of runtime init support to base --- BuildAll.ps1 | 220 ++++++- ...wsAppSDK-BuildWindowsAppSDKBase-Stages.yml | 345 +++++++++++ .../Microsoft.WindowsAppSDK.Arm64Ec.targets | 32 ++ ...t.WindowsAppSDK.AutoInitializer.CS.targets | 0 ...indowsAppSDK.AutoInitializerCommon.targets | 0 .../Microsoft.WindowsAppSDK.Base.Native.props | 6 + ...WindowsAppSDK.Base.TransportPackage.nuspec | 15 + ....WindowsAppSDK.Base.TransportPackage.props | 10 + ...indowsAppSDK.Base.TransportPackage.targets | 7 + .../Microsoft.WindowsAppSDK.Base.nuspec | 21 + .../Microsoft.WindowsAppSDK.Base.props | 23 + .../Microsoft.WindowsAppSDK.Base.targets | 112 ++++ ...Microsoft.WindowsAppSDK.BaseCommon.targets | 56 ++ ...crosoft.WindowsAppSDK.Bootstrap.CS.targets | 0 ...soft.WindowsAppSDK.BootstrapCommon.targets | 0 ...ndowsAppSDK.CompatibilitySetter.CS.targets | 0 ...WindowsAppSDK.DeploymentManager.CS.targets | 0 ...dowsAppSDK.DeploymentManagerCommon.targets | 0 ...rosoft.WindowsAppSDK.SelfContained.targets | 535 ++++++++++++++++++ ...Microsoft.WindowsAppSDK.SingleFile.targets | 57 ++ ...rosoft.WindowsAppSDK.SingleProject.targets | 31 + ...dowsAppSDK.UndockedRegFreeWinRT.CS.targets | 0 ...sAppSDK.UndockedRegFreeWinRTCommon.targets | 5 + ...soft.WindowsAppSDK.AutoInitializer.targets | 0 .../Microsoft.WindowsAppSDK.Base.targets | 67 +++ .../Microsoft.WindowsAppSDK.Bootstrap.targets | 0 ....WindowsAppSDK.CompatibilitySetter.targets | 0 ...ft.WindowsAppSDK.DeploymentManager.targets | 0 ...WindowsAppSDK.UndockedRegFreeWinRT.targets | 0 base/build/Scripts/BLD-BuildBasePackage.ps1 | 71 +++ .../build/WindowsAppSDK-BuildBase-Nightly.yml | 149 +++++ .../WindowsAppSDK-BuildBase-Official.yml | 148 +++++ base/build/WindowsAppSDK-BuildBase-PR.yml | 106 ++++ .../CPP/BasePackageTestCpp.vcxproj | 227 ++++++++ .../BasePackageTest/CPP/Directory.Build.props | 5 + base/test/BasePackageTest/CPP/main.cpp | 79 +++ base/test/BasePackageTest/CPP/nuget.config | 11 + base/test/BasePackageTest/CPP/packages.config | 4 + .../BasePackageTest/CS/BasePackageTest.csproj | 128 +++++ .../BasePackageTest/CS/BasePackageTest.sln | 31 + .../BasePackageTest/CS/Directory.Build.props | 5 + base/test/BasePackageTest/CS/Program.cs | 72 +++ base/test/BasePackageTest/CS/nuget.config | 8 + base/test/RunBasePackageTests.ps1 | 252 +++++++++ build/CopyFilesToStagingDir.ps1 | 23 +- ...Microsoft.WindowsAppSDK.Foundation.targets | 17 +- .../Microsoft.WindowsAppSDK.C.props} | 0 .../Microsoft.WindowsAppSDK.WinRt.props} | 0 .../Microsoft.WindowsAppSDK.props} | 4 +- .../Microsoft.WindowsAppSDK.targets} | 14 +- 50 files changed, 2825 insertions(+), 71 deletions(-) create mode 100644 base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Arm64Ec.targets rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets (100%) rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets (100%) create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.Native.props create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.props create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.targets create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.nuspec create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.props create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets (100%) rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets (100%) rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets (100%) rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets (100%) rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets (100%) create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.SelfContained.targets create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleFile.targets create mode 100644 base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleProject.targets rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets (100%) rename {build => base/build}/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets (67%) rename build/NuSpecs/WindowsAppSDK-Nuget-Native.AutoInitializer.targets => base/build/NuSpecs/native/Microsoft.WindowsAppSDK.AutoInitializer.targets (100%) create mode 100644 base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets rename build/NuSpecs/WindowsAppSDK-Nuget-Native.Bootstrap.targets => base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Bootstrap.targets (100%) rename build/NuSpecs/WindowsAppSDK-Nuget-Native.CompatibilitySetter.targets => base/build/NuSpecs/native/Microsoft.WindowsAppSDK.CompatibilitySetter.targets (100%) rename build/NuSpecs/WindowsAppSDK-Nuget-Native.DeploymentManager.targets => base/build/NuSpecs/native/Microsoft.WindowsAppSDK.DeploymentManager.targets (100%) rename build/NuSpecs/WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets => base/build/NuSpecs/native/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.targets (100%) create mode 100644 base/build/Scripts/BLD-BuildBasePackage.ps1 create mode 100644 base/build/WindowsAppSDK-BuildBase-Nightly.yml create mode 100644 base/build/WindowsAppSDK-BuildBase-Official.yml create mode 100644 base/build/WindowsAppSDK-BuildBase-PR.yml create mode 100644 base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj create mode 100644 base/test/BasePackageTest/CPP/Directory.Build.props create mode 100644 base/test/BasePackageTest/CPP/main.cpp create mode 100644 base/test/BasePackageTest/CPP/nuget.config create mode 100644 base/test/BasePackageTest/CPP/packages.config create mode 100644 base/test/BasePackageTest/CS/BasePackageTest.csproj create mode 100644 base/test/BasePackageTest/CS/BasePackageTest.sln create mode 100644 base/test/BasePackageTest/CS/Directory.Build.props create mode 100644 base/test/BasePackageTest/CS/Program.cs create mode 100644 base/test/BasePackageTest/CS/nuget.config create mode 100644 base/test/RunBasePackageTests.ps1 rename build/NuSpecs/{WindowsAppSDK-Nuget-Native.C.props => native/Microsoft.WindowsAppSDK.C.props} (100%) rename build/NuSpecs/{WindowsAppSDK-Nuget-Native.WinRt.props => native/Microsoft.WindowsAppSDK.WinRt.props} (100%) rename build/NuSpecs/{WindowsAppSDK-Nuget-Native.props => native/Microsoft.WindowsAppSDK.props} (70%) rename build/NuSpecs/{WindowsAppSDK-Nuget-Native.targets => native/Microsoft.WindowsAppSDK.targets} (84%) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 511afa1fcd..e3f73b3ae1 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -36,6 +36,8 @@ $env:Build_SourcesDirectory = (Split-Path $MyInvocation.MyCommand.Path) $buildOverridePath = "build\override" $BasePath = "BuildOutput/FullNuget" $ComponentBasePath = "BuildOutput/ComponentNuget" +$BasePackagePath = "BuildOutput/BaseNuget" +$BaseComponentPath = "BuildOutput/BaseComponentNuget" # FUTURE(YML2PS): Update build to no longer place generated files in sources directory if ($Clean) @@ -292,27 +294,17 @@ Try { } $nuSpecsPath = "build\NuSpecs" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.targets" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.targets" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.props" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.props" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.C.props" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.WinRt.props" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.AutoInitializer.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.Bootstrap.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.CompatibilitySetter.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.DeploymentManager.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets" -Destination "$BasePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.targets" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.targets" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.props" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.props" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.C.props" -Destination "$BasePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.WinRt.props" -Destination "$BasePath\build\native" + + # Bootstrapper and auto-initialization native targets have moved to the Base package. Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.targets" -Destination "$BasePath\build" Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.props" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializer.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializerCommon.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Bootstrap.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BootstrapCommon.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets" -Destination "$BasePath\build" + + # Bootstrapper and auto-initialization managed targets have moved to the Base package. Copy-Item -Path "$nuSpecsPath\AppxManifest.xml" -Destination "$BasePath\AppxManifest.xml" @@ -338,12 +330,10 @@ Try { # Copy MRT metadata files. Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.C.props" -Destination "$BasePath\build\native" Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.props" -Destination "$BasePath\build\native" - Copy-Item -Path "$MRTSourcesDirectory\packaging\README.md" -Destination "$BasePath\build" Copy-Item -Path "$MRTSourcesDirectory\mrt\core\src\MRM.h" -Destination "$BasePath\include" Copy-Item -Path "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\Microsoft.Windows.ApplicationModel.Resources.idl" -Destination "$BasePath\include" - # If AnyCPU generates another dll it needs to be added here. - Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\anycpu\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" -destination "$BasePath\lib\net6.0-windows10.0.17763.0" + # Bootstrap.Net.dll has moved to the Base package. #------------------ # Move other files and prepare manifest and appxmanifest.xml @@ -503,6 +493,158 @@ Try { Copy-Item -Path $IntellisenseFile -Destination $DestinationDir } } + if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "StageBaseFiles")) + { + #------------------ + # Stage files for Base Package + #------------------ + if(-not (test-path "$BasePackagePath")) + { + new-item -path "$BasePackagePath" -itemtype "directory" + } + if(-not (test-path "$BaseComponentPath")) + { + new-item -path "$BaseComponentPath" -itemtype "directory" + } + if(-not (test-path "$BasePackagePath\build\native")) + { + new-item -path "$BasePackagePath\build\native" -itemtype "directory" -force + } + if(-not (test-path "$BaseComponentPath\build\native")) + { + new-item -path "$BaseComponentPath\build\native" -itemtype "directory" -force + } + if(-not (test-path "$BasePackagePath\include")) + { + new-item -path "$BasePackagePath\include" -itemtype "directory" -force + } + + $nuSpecsPath = "base\build\NuSpecs" + + # Stage Base native targets + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.Base.targets" -Destination "$BasePackagePath\build\native\Microsoft.WindowsAppSDK.Base.targets" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.AutoInitializer.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.Bootstrap.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.CompatibilitySetter.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.DeploymentManager.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.targets" -Destination "$BasePackagePath\build\native" + + # Stage Base managed targets + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.props" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BaseCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializer.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializerCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Bootstrap.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BootstrapCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets" -Destination "$BasePackagePath\build" + + # Stage deployment-mode targets (from aggregator) + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.SelfContained.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.SingleFile.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.SingleProject.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Arm64Ec.targets" -Destination "$BasePackagePath\build" + + # Stage native props (delegates to parent props) + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.Native.props" -Destination "$BasePackagePath\build\native\Microsoft.WindowsAppSDK.Base.props" + + # Stage Bootstrap binaries and auto-initializer source files per-platform + foreach($configurationToRun in $configuration.Split(",")) + { + foreach($platformToRun in $platform.Split(",")) + { + $buildOutputDir = "BuildOutput\$configurationToRun\$platformToRun" + $bootstrapOutput = "$buildOutputDir\WindowsAppRuntime_BootstrapDLL" + $autoInitOutput = "$buildOutputDir\WindowsAppRuntime_DLL" + + # Bootstrap binaries + if(-not (test-path "$BasePackagePath\runtimes\win-$platformToRun\native")) + { + new-item -path "$BasePackagePath\runtimes\win-$platformToRun\native" -itemtype "directory" -force + } + if(-not (test-path "$BasePackagePath\lib\win10-$platformToRun")) + { + new-item -path "$BasePackagePath\lib\win10-$platformToRun" -itemtype "directory" -force + } + Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.dll" -destination "$BasePackagePath\runtimes\win-$platformToRun\native" -force -ErrorAction SilentlyContinue + Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.pdb" -destination "$BasePackagePath\runtimes\win-$platformToRun\native" -force -ErrorAction SilentlyContinue + Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.lib" -destination "$BasePackagePath\lib\win10-$platformToRun" -force -ErrorAction SilentlyContinue + + # MddBootstrap.h header + Copy-Item -path "$bootstrapOutput\MddBootstrap.h" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + + # Auto-initializer source files + Copy-Item -path "$autoInitOutput\WindowsAppRuntimeAutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + Copy-Item -path "$autoInitOutput\WindowsAppRuntimeAutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + Copy-Item -path "$autoInitOutput\DeploymentManagerAutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + Copy-Item -path "$autoInitOutput\DeploymentManagerAutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + Copy-Item -path "$autoInitOutput\UndockedRegFreeWinRT-AutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + Copy-Item -path "$autoInitOutput\UndockedRegFreeWinRT-AutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + + # Bootstrap auto-initializer source files + Copy-Item -path "$bootstrapOutput\MddBootstrapAutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + Copy-Item -path "$bootstrapOutput\MddBootstrapAutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue + } + } + + # Stage Bootstrap.Net.dll + $anyCpuConfig = $configuration.Split(",")[0] + $bootstrapNetDir = "BuildOutput\$anyCpuConfig\AnyCPU\Microsoft.WindowsAppRuntime.Bootstrap.Net" + if(-not (test-path "$BasePackagePath\lib\net6.0-windows10.0.17763.0")) + { + new-item -path "$BasePackagePath\lib\net6.0-windows10.0.17763.0" -itemtype "directory" -force + } + Copy-Item -path "$bootstrapNetDir\Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" -destination "$BasePackagePath\lib\net6.0-windows10.0.17763.0" -force -ErrorAction SilentlyContinue + + # Copy Base package files to component path + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BasePackagePath 'build') ` + -dest (Join-Path $BaseComponentPath 'build') + + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BasePackagePath 'include') ` + -dest (Join-Path $BaseComponentPath 'include') + + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BasePackagePath 'build') ` + -dest (Join-Path $BaseComponentPath 'buildTransitive') + + # Copy transport package specific props / targets + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.props" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.props" -Destination "$BasePackagePath\build\native" + + Copy-Item -Path "LICENSE" -Destination "$BasePackagePath\license.txt" -force + Copy-Item -Path "LICENSE" -Destination "$BaseComponentPath\license.txt" -force + + # Copy runtimes and lib to component path + foreach($platformToRun in $platform.Split(",")) + { + if (test-path "$BasePackagePath\runtimes\win-$platformToRun") + { + build\Scripts\RobocopyWrapper.ps1 ` + -Source "$BasePackagePath\runtimes\win-$platformToRun" ` + -dest "$BaseComponentPath\runtimes\win-$platformToRun" + } + if (test-path "$BasePackagePath\lib\win10-$platformToRun") + { + build\Scripts\RobocopyWrapper.ps1 ` + -Source "$BasePackagePath\lib\win10-$platformToRun" ` + -dest "$BaseComponentPath\lib\win10-$platformToRun" + } + } + if (test-path "$BasePackagePath\lib\net6.0-windows10.0.17763.0") + { + build\Scripts\RobocopyWrapper.ps1 ` + -Source "$BasePackagePath\lib\net6.0-windows10.0.17763.0" ` + -dest "$BaseComponentPath\lib\net6.0-windows10.0.17763.0" + } + } if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "PackNuget")) { # Remove ProjectCapability for the one in the transport package @@ -595,6 +737,42 @@ Try { exit 1 } } + if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "PackBaseNuget")) + { + $nuspecPath = "BuildOutput\Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec" + Copy-Item -Path ".\base\build\NuSpecs\Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec" -Destination $nuspecPath + + # Add the version to the nuspec. + [xml]$publicNuspec = Get-Content -Path $nuspecPath + $publicNuspec.package.metadata.version = $PackageVersion + Set-Content -Value $publicNuspec.OuterXml $nuspecPath + + # Make the Base transport package. + nuget pack $nuspecPath -BasePath $BasePackagePath -OutputDirectory $OutputDirectory + + if ($lastexitcode -ne 0) + { + write-host "ERROR: nuget.exe pack $nuspecPath FAILED." + exit 1 + } + + $nuspecPath = "BuildOutput\Microsoft.WindowsAppSDK.Base.nuspec" + Copy-Item -Path ".\base\build\NuSpecs\Microsoft.WindowsAppSDK.Base.nuspec" -Destination $nuspecPath + + # Add the version to the nuspec. + [xml]$publicNuspec = Get-Content -Path $nuspecPath + $publicNuspec.package.metadata.version = $ComponentPackageVersion + Set-Content -Value $publicNuspec.OuterXml $nuspecPath + + # Make the Base component package. + nuget pack $nuspecPath -BasePath $BaseComponentPath -OutputDirectory $OutputDirectory + + if ($lastexitcode -ne 0) + { + write-host "ERROR: nuget.exe pack $nuspecPath FAILED." + exit 1 + } + } $files = Get-ChildItem $OutputDirectory -File -Filter "*.nupkg" foreach ($file in $files) { diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml new file mode 100644 index 0000000000..dbbeee99a2 --- /dev/null +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -0,0 +1,345 @@ +parameters: +- name: BuildType + type: string + default: 'stable' +- name: IsOfficial + type: boolean + default: false +- name: PushPackageToInternalFeed + displayName: "Push Release Versioned Windows App SDK Packages To InternalFeed (Only applicable in Release Builds)" + type: boolean + default: false +- name: SignOutput + displayName: "Sign packages and their contents" + type: boolean + default: false +- name: PublishToMaestro + displayName: "Publish To Maestro" + type: boolean + default: false +- name: runStaticAnalysis + type: boolean + default: true + +stages: +- stage: WindowsAppSDKBasePackage + dependsOn: '' + condition: and(succeeded(), ne(variables.EnableTestImageValidation, true)) + jobs: + - job: Build + pool: + # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs + type: windows + variables: + - name: ob_outputDirectory + value: '$(REPOROOT)\out' + - name: ob_sdl_codeSignValidation_excludes + value: '$(CodeSignValidationExclude)' + - name: ob_artifactBaseName + value: "WindowsAppSDK_Base_Nuget" + - name: ob_sdl_apiscan_enabled + value: ${{ iif(parameters.runStaticAnalysis, true, false) }} + # Focus on scanning x64fre, as a start. + - name: ob_sdl_apiscan_softwareFolder + value: '$(REPOROOT)\BuildOutput\Release\x64' + - name: ob_sdl_apiscan_symbolsFolder + value: '$(REPOROOT)\BuildOutput\Release\x64;SRV*https://symweb.azurefd.net' + - template: AzurePipelinesTemplates/WindowsAppSDK-Global-LKGVersions.yml@WindowsAppSDKVersionConfig + - name: localCompilerOverridePackageName + value: $[coalesce(variables.compilerOverridePackageName, variables.global_CompilerOverridePackageName)] + - name: localCompilerOverridePackageVersion + value: $[coalesce(variables.compilerOverridePackageVersion, variables.global_CompilerOverridePackageVersion)] + - name: localCompilerOverrideNupkgVersion + value: $[coalesce(variables.compilerOverrideNupkgVersion, variables.global_CompilerOverrideNupkgVersion)] + - name: ob_sdl_checkCompliantCompilerWarnings + value: true # This setting has no effect unless ob_sdl_msbuildOverride below is also set to true. + - name: ob_sdl_prefast_runDuring + value: 'Guardian' # The default 'Build' setting does not match the fact that we are calling msbuild.exe directly. + - name: ob_sdl_msbuildOverride + value: true # Because we are calling MSBuild directly instead of through the MSBuild@1 or VSBuild@1 tasks. + steps: + - script: | + echo ob_sdl_apiscan_enabled : $(ob_sdl_apiscan_enabled) + echo ob_sdl_checkCompliantCompilerWarnings: $(ob_sdl_checkCompliantCompilerWarnings) + echo ob_sdl_prefast_runDuring : $(ob_sdl_prefast_runDuring) + echo ob_sdl_msbuildOverride : $(ob_sdl_msbuildOverride) + echo Agent.JobName : $(Agent.JobName) + echo AppxContentFolder : $(AppxContentFolder) + echo Build.ArtifactStagingDirectory : $(Build.ArtifactStagingDirectory) + echo Build.BuildId : $(Build.BuildId) + echo Build.Reason : $(Build.Reason) + echo Build.RequestedFor : $(Build.RequestedFor) + echo Build.SourceBranch : $(Build.SourceBranch) + echo Build.SourcesDirectory : $(Build.SourcesDirectory) + echo buildConfiguration : $(buildConfiguration) + echo buildPlatform : $(buildPlatform) + echo CodeSignValidationExclude : $(CodeSignValidationExclude) + echo compilerOverridePackageName : $(compilerOverridePackageName) + echo compilerOverridePackageVersion : $(compilerOverridePackageVersion) + echo DownloadCenterUri : $(DownloadCenterUri) + echo downloadDetail.portalName : $(downloadDetail.portalName) + echo EnforceVersionSyncPackages : $(EnforceVersionSyncPackages) + echo feature : $(feature) + echo global_CompilerOverridePackageName : $(global_CompilerOverridePackageName) + echo global_CompilerOverridePackageVersion: $(global_CompilerOverridePackageVersion) + echo imageName : $(imageName) + echo LastReleaseNugetVersion : $(LastReleaseNugetVersion) + echo LatestShortUrl : $(LatestShortUrl) + echo localCompilerOverrideNupkgVersion : $(localCompilerOverrideNupkgVersion) + echo localCompilerOverridePackageName : $(localCompilerOverridePackageName) + echo localCompilerOverridePackageVersion : $(localCompilerOverridePackageVersion) + echo MajorVersion : $(MajorVersion) + echo mySourceBranch : $(mySourceBranch) + echo ob_outputDirectory : $(ob_outputDirectory) + echo PayloadTrackingGitHubPAT : $(PayloadTrackingGitHubPAT) + echo poolName : $(poolName) + echo PreviousWindowsAppSDKVersion : $(PreviousWindowsAppSDKVersion) + echo RedirectionAppID : $(RedirectionAppID) + echo RedirectionAppIdUrl : $(RedirectionAppIdUrl) + echo RedirectionAuthority : $(RedirectionAuthority) + echo RedirectionCert : $(RedirectionCert) + echo RedirectionServiceEndpoint : $(RedirectionServiceEndpoint) + echo REPOROOT : $(REPOROOT) + echo Revision : $(Revision) + echo SamplesBranch : $(SamplesBranch) + echo SamplesRepoName : $(SamplesRepoName) + echo SelfContainedSwitch : $(SelfContainedSwitch) + echo System.AccessToken : $(System.AccessToken) + echo System.ArtifactsDirectory : $(System.ArtifactsDirectory) + echo System.DefinitionId : $(System.DefinitionId) + echo System.PullRequest.targetBranchName : $(System.PullRequest.targetBranchName) + echo System.StageName : $(System.StageName) + echo System.TeamProjectId : $(System.TeamProjectId) + echo testLocale : $(testLocale) + echo testPayloadArtifactDir : $(testPayloadArtifactDir) + echo testPayloadDir : $(testPayloadDir) + echo VCToolsInstallDir : $(VCToolsInstallDir) + echo VersionTag : $(VersionTag) + echo vPackDescription : $(vPackDescription) + echo vPackName : $(vPackName) + echo vPackSourceFolder : $(vPackSourceFolder) + echo vPackVersion : $(vPackVersion) + echo WindowsAppSDKPackageVersion : $(WindowsAppSDKPackageVersion) + echo WindowsAppSDKPackageVersionMajorMinor: $(WindowsAppSDKPackageVersionMajorMinor) + echo windowsPublicsWinmdVersion : $(windowsPublicsWinmdVersion) + echo WindowsSDKVersion : $(WindowsSDKVersion) + echo _useBuildOutputFromBuildId : $(_useBuildOutputFromBuildId) + echo _useBuildOutputFromPipeline : $(_useBuildOutputFromPipeline) + echo CallerEnablesTestImageValidation : $(CallerEnablesTestImageValidation) + echo EnableTestImageValidation : $(EnableTestImageValidation) + echo CallerEnablesBuildImageValidation : $(CallerEnablesBuildImageValidation) + echo EnableBuildImageValidation : $(EnableBuildImageValidation) + echo TestImageToValidate : $(TestImageToValidate) + displayName: 'Variables' + + - template: build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml + parameters: + BuildType: ${{ parameters.BuildType }} + + - task: UseDotNet@2 + continueOnError: true + inputs: + packageType: 'sdk' + useGlobalJson: true + performMultiLevelLookup: true + + - task: NuGetAuthenticate@1 + + - task: PowerShell@2 + name: DetermineNugetPackageVersion + displayName: 'Determine Nuget Package Version' + inputs: + targetType: 'inline' + script: | + $paddedRevision = '$(Revision)' + if([int]$(Revision) -lt 10) + { + $paddedRevision = '00' + '$(Revision)' + } + elseif ([int]$(Revision) -lt 100) + { + $paddedRevision = '0' + '$(Revision)' + } + Write-Host "paddedRevision " $paddedRevision + + if ([int]$(Revision) -gt 999) + { + Write-Host "Revision Number limit reach. Please try again the next day" + Write-Host "##vso[task.complete result=Failed;]DONE" + } + + $buildType = '${{ parameters.BuildType }}' + $majorMinorPatchRev = '$(MajorVersion).$(MinorVersion).$(PatchVersion)' + $majorMinorPatchRev = $majorMinorPatchRev + $paddedRevision + $version = $majorMinorPatchRev + '-' + $buildType + + # If using release versioning, drop the version suffix, which includes a tag & build stamp. + # This should only be done when prepping final release packages. + + if ('${{ parameters.IsOfficial }}' -eq 'true') + { + $versionTag = '$(VersionTag)' + + # Allow override from pipeline variable + $versionTagOverride = '$(VersionTagOverride)'.Trim() + if (-not [String]::IsNullOrEmpty($versionTagOverride)) { + Write-Host "VersionTagOverride provided: $versionTagOverride" + $versionTag = $versionTagOverride + } + + Write-Host "VersionTag: " $versionTag + if ($buildType -ne "stable" -and -not $versionTag.StartsWith($buildType)) + { + if (-not [String]::IsNullOrEmpty($versionTagOverride)) { + Write-Host "ERROR: VersionTagOverride '$versionTagOverride' must start with '$buildType'" + } else { + Write-Host "ERROR: Variable VersionTag '$versionTag' must start with '$buildType'" + } + Write-Host "Please update this variable and restart the build" + Write-Host "##vso[task.complete result=Failed;]DONE" + } + if ($buildType -eq "stable" -and -not [String]::IsNullOrEmpty($versionTag)) + { + Write-Host "Stable builds must have an empty VersionTag" + Write-Host "Please update this variable and restart the build" + Write-Host "##vso[task.complete result=Failed;]DONE" + } + + $formattedTag = '' + if(-not [String]::IsNullOrEmpty($versionTag)) + { + $formattedTag = '-' + $versionTag + } + Write-Host "Using Release Versioning" + $version = $majorMinorPatchRev + $formattedTag + } + + # Write the version we generated here to Version.Details.xml for BuildAll.ps1 to read from + [xml]$versionDetailsPath = Get-Content -Path "eng\Version.Details.xml" + $WindowsAppSDKConfigVersionDependency = $versionDetailsPath.Dependencies.ToolsetDependencies.Dependency | Where-Object { $_.Name -eq "Microsoft.WindowsAppSDK.Version" } + $WindowsAppSDKConfigVersionDependency.Version = $version + + Set-Content -Encoding utf8 -Value $versionDetailsPath.OuterXml -Path "eng\Version.Details.xml" + Write-Host 'Package Version: ' $version + Write-Host "##vso[task.setvariable variable=WindowsAppSDKPackageVersion;isOutput=true]$version" + Write-Host "##vso[task.setvariable variable=WindowsAppSDKPackageVersion;]$version" + + - task: WinUndockNativeCompiler@1 + displayName: 'Setup native compiler version override' + inputs: + microsoftDropReadPat: $(System.AccessToken) + compilerPackageName: $(localCompilerOverridePackageName) + compilerPackageVersion: $(localCompilerOverridePackageVersion) + slnDirectory: $(Build.SourcesDirectory) + + - task: PowerShell@2 + name: StageBaseFiles + displayName: 'Stage Base Package Files' + inputs: + filePath: 'BuildAll.ps1' + arguments: -AzureBuildStep StageBaseFiles -Platform "x86,x64,arm64" -Configuration Release + + - task: PowerShell@2 + name: PackBaseNuget + displayName: 'Pack Base NuGet Packages' + inputs: + filePath: 'BuildAll.ps1' + arguments: -AzureBuildStep PackBaseNuget -Platform "x86,x64,arm64" -Configuration Release + + # Guardian's PREFast only supports auto detection of msbuild/vsbuild tasks. Hence, explicitly invoke the PREFast task as a workaround. + - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + - task: SDLNativeRules@3 + #condition: and(succeeded(), eq(variables['buildConfiguration'], 'Release'), eq(variables['buildPlatform'], 'x64')) + displayName: Run the PREfast SDL Native Rules + inputs: + # Using the auto parameter below is simpler, but because we are not using the msbuild/vsbuild task above for the build operation above, + # the PREFast task is unable to auto infer the build arguments. Hence, using a simplified explicit msbuild commandline instead. + #userProvideBuildInfo: auto + setupCommandlines: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"' + msBuildArchitecture: amd64 + msBuildCommandline: 'msbuild.exe /nologo /nr:false /p:configuration=Release /p:platform=x64 $(Build.SourcesDirectory)\WindowsAppRuntime.Dev.sln' + # Generally speaking, we leave it to the external repos to scan the bits in their packages. + excludedPaths: | + $(Build.SourcesDirectory)\packages + # Explicitly specify the EO-compliant rule set, as the default Sdl.Recommended.Warning.ruleset is not EO-compliant. + rulesetName: Custom + customRuleset: $(Agent.ToolsDirectory)\NativeCompilerStaticAnalysisRuleset\mandatory_to_fix.ruleset + policyName: 'WindowsUndocked' + continueOnError: true + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + + # Nuget sign the Nuget Packages + - ${{ if eq(parameters.SignOutput, 'true') }}: + - template: AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WindowsAppSDKConfig + parameters: + DisplayName: ' CodeSign Nuget packages' + FolderPath: '$(REPOROOT)\BuildOutput' + Pattern: | + Microsoft.WindowsAppSDK.Base.*.nupkg + UseMinimatch: true + KeyCode: 'CP-401405' + + - task: CopyFiles@2 + inputs: + SourceFolder: '$(REPOROOT)\BuildOutput' + Contents: | + **/*.nupkg + targetFolder: $(ob_outputDirectory)\NugetPackages + + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Governance Detection' + + - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 + displayName: 'NuGet push Microsoft.WindowsAppSDK NuGet packages to Project.Reunion.nuget.internal' + condition: or(eq(${{ parameters.PushPackageToInternalFeed }}, true), eq(variables['Build.Reason'], 'Schedule')) + inputs: + command: 'push' + packagesToPush: '$(ob_outputDirectory)/NugetPackages/Microsoft.WindowsAppSDK.Base.*.nupkg' + verbosityPush: 'Detailed' + nuGetFeedType: 'internal' + # ignore conflicts which come from rerunning with the same input packages + allowPackageConflicts: true + #Note: The project qualifier is always required when using a feed name. Also, do not use organization scoped feeds. + publishVstsFeed: 'ProjectReunion/Project.Reunion.nuget.internal' + + - task: PowerShell@2 + displayName: 'Verify Nuspec Fields' + inputs: + targetType: 'inline' + script: | + $elements = @( + "© Microsoft Corporation. All rights reserved." + "Microsoft" + "Microsoft" + ); + + $issues = ""; + foreach ($element in $elements) + { + $foundElementBase = Select-String -Path $(REPOROOT)\base\build\NuSpecs\Microsoft.WindowsAppSDK.Base.nuspec -Pattern $element; + if ([string]::IsNullOrEmpty($foundElementBase)) { $issues += $element; } + } + + if (![string]::IsNullOrEmpty($issues)) + { + Write-Host ##vso[task.logissue type=error;] The following elements are missing or wrong: $issues + Exit 1 + } + +- stage: PublishBasePackageToMaestro + dependsOn: + - WindowsAppSDKBasePackage + condition: | + and(eq(${{ parameters.PushPackageToInternalFeed }}, true), eq(${{ parameters.PublishToMaestro }}, true), ne(variables.EnableTestImageValidation, true), ne(variables.EnableBuildImageValidation, true)) + jobs: + - job: PublishNugetPackage + pool: + type: windows + isCustom: true + name: 'ProjectReunionESPool-2022' # This stage is purely for ES, hence this custom pool + steps: + - template: ${{variables['System.DefaultWorkingDirectory']}}\\AzurePipelinesTemplates/WindowsAppSDK-PublishToMaestro-Steps.yml@WindowsAppSDKConfig + parameters: + NuGetArtifactNames: + - "WindowsAppSDK_Base_Nuget" \ No newline at end of file diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Arm64Ec.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Arm64Ec.targets new file mode 100644 index 0000000000..e5283a4aad --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Arm64Ec.targets @@ -0,0 +1,32 @@ + + + + + + + + + + + $(WV2WinRTPath)..\..\build\native\x64;%(AdditionalLibraryDirectories) + + + + + $([MSBuild]::NormalizePath($(WV2WinRTPath), "..\..\build\")) + + + + + + + + + + x64 + + + diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.Native.props b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.Native.props new file mode 100644 index 0000000000..a15448cc78 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.Native.props @@ -0,0 +1,6 @@ + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec new file mode 100644 index 0000000000..b63bd495fe --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec @@ -0,0 +1,15 @@ + + + + Microsoft.WindowsAppSDK.Base.TransportPackage + 1.0 + $id$ + Microsoft + Windows App SDK - Base Transport Package + license.txt + true + https://aka.ms/windowsappsdk + © Microsoft Corporation. All rights reserved. + Microsoft Native Windows WindowsAppSDK + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.props b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.props new file mode 100644 index 0000000000..c8637f3254 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.props @@ -0,0 +1,10 @@ + + + + + true + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.targets new file mode 100644 index 0000000000..b8036d2b44 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.targets @@ -0,0 +1,7 @@ + + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.nuspec b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.nuspec new file mode 100644 index 0000000000..db96c2e3e3 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.nuspec @@ -0,0 +1,21 @@ + + + + Microsoft.WindowsAppSDK.Base + 0.0.0.0 + Microsoft Windows App SDK Base Package + Microsoft + Microsoft + true + license.txt + https://github.com/microsoft/windowsappsdk + https://raw.githubusercontent.com/microsoft/WindowsAppSDK/main/assets/WindowsAppSDK64.png + The Windows App SDK empowers all Windows Desktop apps with modern Windows UI, APIs, and platform features, including back-compat support. This is a package that is used as a dependency by other Windows App SDK component packages and not meant to be directly referenced. + © Microsoft Corporation. All rights reserved. + Windows "Windows App SDK" WinAppSDK WinUI XAML Fluent Controls Downlevel Compatibility TreeView ColorPicker NavigationView MenuBar Resources Native DWriteCore "Interactive Experiences" ixp "Project Reunion" ProjectReunion + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.props b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.props new file mode 100644 index 0000000000..ed05f93f14 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.props @@ -0,0 +1,23 @@ + + + + $(PrepareForBuildDependsOn);WindowsAppSDKVerifyKitVersion + + + + + false + true + + + + + + <_ExperimentalPackages Include="@(WindowsAppSdkComponentPackages)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', 'Microsoft\.WindowsAppSDK([.\\][^\\]*)*-(?!stable)(?!preview)'))" /> + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets new file mode 100644 index 0000000000..dc088eeb3a --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets @@ -0,0 +1,112 @@ + + + + + + <_WindowsAppSDKMinTPV Condition="'$(TargetPlatformMinVersion)' != ''">$(TargetPlatformMinVersion) + <_WindowsAppSDKMinTPV Condition="'$(_WindowsAppSDKMinTPV)' == ''">$(TargetPlatformVersion) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(ResolveReferencesDependsOn);WindowsAppSDKVerifyCsWinRtVersions + + + + + <_TargetFrameworkRequired>6.0 + <_TargetFrameworkCompatible Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(_TargetFrameworkRequired)'))">True + + + <_WindowsSdkPackage Include="$(WindowsSdkPackageVersion)" Condition="'$(WindowsSdkPackageVersion)' != ''"> + $(WindowsSdkPackageVersion) + 10.0.$([System.Version]::Parse("$(WindowsSdkPackageVersion.Split('-')[0])").Build).38 + + <_WindowsSdkPackage Include="@(ResolvedFrameworkReference)" Condition="'$(WindowsSdkPackageVersion)' == '' and '@(ResolvedFrameworkReference)' != '' and + ('%(Identity)' == 'Microsoft.Windows.SDK.NET.Ref' or '%(Identity)' == 'Microsoft.Windows.SDK.NET.Ref.Windows')"> + %(ResolvedFrameworkReference.TargetingPackVersion) + 10.0.$([System.Version]::Parse("%(ResolvedFrameworkReference.TargetingPackVersion)").Build).38 + + <_WindowsSdkCompatible Include="@(_WindowsSdkPackage)" Condition="'@(_WindowsSdkPackage)' != '' and $([MSBuild]::VersionGreaterThanOrEquals(%(Referenced), %(Required)))" /> + + + <_WindowsSdkPackageRequired>@(_WindowsSdkPackage->'%(Required)') + + + + + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets new file mode 100644 index 0000000000..1ff91b15c3 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets @@ -0,0 +1,56 @@ + + + + + + true + <_WindowsAppSDKSelfContainedSetByDefault>true + + + + + <_WindowsAppSDKTPVBuild Condition="'$(_WindowsAppSDKMinTPV)' != ''">$([System.Version]::Parse('$(_WindowsAppSDKMinTPV)').Build) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.SelfContained.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SelfContained.targets new file mode 100644 index 0000000000..ec286de525 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SelfContained.targets @@ -0,0 +1,535 @@ + + + + + + false + + + false + + + false + + $(MSBuildThisFileDirectory)\..\tools\mt.exe + $(WindowsSDKBuildToolsBinVersionedArchFolder)\mt.exe + $(WindowsSdkDir)bin\$(Platform)\mt.exe + mt.exe + + + + $(GetCopyToOutputDirectoryItemsDependsOn); + AddMicrosoftWindowsAppSDKPayloadFilesFromMsix; + AddMicrosoftWindowsAppSDKPayloadFilesFromComponents + + + true + true + + + $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)','$(IntermediateOutputPath)')) + $(IntermediateOutputPath) + + + + + + + + + + + + + $(ApplicationManifest) + @(Manifest) + $(SelfContainedIntermediateOutputPath)Manifests\app.manifest + + + + + + + + + Invalid + x86 + x86 + x64 + arm64 + arm64ec + + + x64 + x86 + arm64 + arm + + + + + + + $(SelfContainedIntermediateOutputPath)MsixContent + $(MicrosoftWindowsAppSDKMsixContent)\AppxManifest.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + runtimes-framework\win-$(NativePlatform)\native + 10.0.17763.0 + 10.0.18362.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"; + var sb = new StringBuilder(); + sb.AppendLine(headerF); + + var dllFileFormat = RedirectDlls ? + @" " : + @" "; + + if (!string.IsNullOrEmpty(InAppxManifest)) + { + XmlDocument doc = new XmlDocument(); + doc.Load(InAppxManifest); + var nsmgr = new XmlNamespaceManager(doc.NameTable); + nsmgr.AddNamespace("m", "http://schemas.microsoft.com/appx/manifest/foundation/windows10"); + // Add InProcessServer elements to the generated appxmanifest + var xQuery = "./m:Package/m:Extensions/m:Extension/m:InProcessServer"; + var dllFiles = (from di in (new DirectoryInfo(MsixContentDir).EnumerateFiles("*.dll")) select di.Name).ToList(); + foreach (XmlNode winRTFactory in doc.SelectNodes(xQuery, nsmgr)) + { + var dllFileNode = winRTFactory.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + var typesNames = winRTFactory.SelectNodes("./m:ActivatableClass", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNames) + { + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeName = attribs + .OfType() + .SingleOrDefault(x => x.Name == "ActivatableClassId") + .InnerText; + var xmlEntryFormat = +@" "; + sb.AppendFormat(xmlEntryFormat, typeName); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + if(RedirectDlls) + { + foreach (var dllFile in dllFiles) + { + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(@""); + } + } + // Add ProxyStub elements to the generated appxmanifest + xQuery = "./m:Package/m:Extensions/m:Extension/m:ProxyStub"; + dllFiles = (from di in (new DirectoryInfo(MsixContentDir).EnumerateFiles("*.dll")) select di.Name).ToList(); + foreach (XmlNode proxystub in doc.SelectNodes(xQuery, nsmgr)) + { + var classIDAdded = false; + + var dllFileNode = proxystub.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + // exclude PushNotificationsLongRunningTask, which requires the Singleton (which is unavailable for self-contained apps) + // exclude Widgets entries unless/until they have been tested and verified by the Widgets team + if (dllFile == "PushNotificationsLongRunningTask.ProxyStub.dll" || dllFile == "Microsoft.Windows.Widgets.dll") + { + continue; + } + var typesNamesForProxy = proxystub.SelectNodes("./m:Interface", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNamesForProxy) + { + if(!classIDAdded) + { + var classIdAttribute = proxystub.Attributes.OfType().ToArray(); + var classID = classIdAttribute + .OfType() + .SingleOrDefault(x => x.Name == "ClassId") + .InnerText; + + var xmlEntryFormat = @" "; + sb.AppendFormat(xmlEntryFormat, classID); + classIDAdded = true; + } + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeID = attribs + .OfType() + .SingleOrDefault(x => x.Name == "InterfaceId") + .InnerText; + var typeNames = attribs + .OfType() + .SingleOrDefault(x => x.Name == "Name") + .InnerText; + var xmlEntryFormatForStubs = @" "; + sb.AppendFormat(xmlEntryFormatForStubs, typeNames, typeID); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + if(RedirectDlls) + { + foreach (var dllFile in dllFiles) + { + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(@""); + } + } + } + sb.AppendLine(@""); + var manifestContent = sb.ToString(); + File.WriteAllText(OutAppManifest, manifestContent, Encoding.UTF8); +]]> + + + + + + + + + + + + + + + + + + + +"; + var sb = new StringBuilder(); + sb.AppendLine(headerF); + + var dllFileFormat = RedirectDlls ? + @" " : + @" "; + var dllFiles = FrameworkDlls.Select(Path.GetFileName).ToList(); + + foreach (String appxFragment in AppxFragments) + { + XmlDocument doc = new XmlDocument(); + doc.Load(appxFragment); + var nsmgr = new XmlNamespaceManager(doc.NameTable); + nsmgr.AddNamespace("m", "http://schemas.microsoft.com/appx/manifest/foundation/windows10"); + var xQuery = "./m:Fragment/m:Extensions/m:Extension/m:InProcessServer"; + foreach (XmlNode winRTFactory in doc.SelectNodes(xQuery, nsmgr)) + { + var dllFileNode = winRTFactory.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + var typesNames = winRTFactory.SelectNodes("./m:ActivatableClass", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNames) + { + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeName = attribs + .OfType() + .SingleOrDefault(x => x.Name == "ActivatableClassId") + .InnerText; + var xmlEntryFormat = +@" "; + sb.AppendFormat(xmlEntryFormat, typeName); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + + // Add ProxyStub elements to the generated appxmanifest + xQuery = "./m:Fragment/m:Extensions/m:Extension/m:ProxyStub"; + foreach (XmlNode proxystub in doc.SelectNodes(xQuery, nsmgr)) + { + var classIDAdded = false; + + var dllFileNode = proxystub.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + // exclude PushNotificationsLongRunningTask, which requires the Singleton (which is unavailable for self-contained apps) + // exclude Widgets entries unless/until they have been tested and verified by the Widgets team + if (dllFile == "PushNotificationsLongRunningTask.ProxyStub.dll" || dllFile == "Microsoft.Windows.Widgets.dll") + { + continue; + } + var typesNamesForProxy = proxystub.SelectNodes("./m:Interface", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNamesForProxy) + { + if(!classIDAdded) + { + var classIdAttribute = proxystub.Attributes.OfType().ToArray(); + var classID = classIdAttribute + .OfType() + .SingleOrDefault(x => x.Name == "ClassId") + .InnerText; + + var xmlEntryFormat = @" "; + sb.AppendFormat(xmlEntryFormat, classID); + classIDAdded = true; + } + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeID = attribs + .OfType() + .SingleOrDefault(x => x.Name == "InterfaceId") + .InnerText; + var typeNames = attribs + .OfType() + .SingleOrDefault(x => x.Name == "Name") + .InnerText; + var xmlEntryFormatForStubs = @" "; + sb.AppendFormat(xmlEntryFormatForStubs, typeNames, typeID); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + } + + if(RedirectDlls) + { + foreach (var dllFile in dllFiles) + { + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(@""); + } + } + + sb.AppendLine(@""); + var manifestContent = sb.ToString(); + File.WriteAllText(OutAppManifest, manifestContent, Encoding.UTF8); +]]> + + + + + + + + $(SelfContainedIntermediateOutputPath)Manifests\WindowsAppSDK.manifest + false + true + + + + + + + + + + + + + + + + + + + + <_TemporaryFilteredWapProjOutput Include="@(_FilteredNonWapProjProjectOutput)" /> + <_FilteredNonWapProjProjectOutput Remove="@(_TemporaryFilteredWapProjOutput)" /> + <_FilteredNonWapProjProjectOutput Include="@(_TemporaryFilteredWapProjOutput)"> + + + + + + + <_DetailedPriXml Remove="@(_DetailedPriXml)" /> + + + + + + + + <_SavedProjectReferenceWithConfiguration Include="@(ProjectReferenceWithConfiguration)"> + $(Configuration) + $(Platform) + + + + + + + + + <_AppxWinmdFilesToHarvest Remove="@(_AppxWinmdFilesToHarvest)" /> + + + + + + + + %(PreprocessorDefinitions);MICROSOFT_WINDOWSAPPSDK_SELFCONTAINED=1 + + + + + $(DefineConstants);MICROSOFT_WINDOWSAPPSDK_SELFCONTAINED + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleFile.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleFile.targets new file mode 100644 index 0000000000..0ed47375ae --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleFile.targets @@ -0,0 +1,57 @@ + + + + + + true + + + + + + + + + + + + + + + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleProject.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleProject.targets new file mode 100644 index 0000000000..17a9a6e2c1 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleProject.targets @@ -0,0 +1,31 @@ + + + + true + + + + + $(ProjectDir)Properties\launchSettings.json + .*"commandName" *: *"MsixPackage".* + + + + + + + + + + + + + diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets similarity index 67% rename from build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets index 633e6be6e2..29ea2ee691 100644 --- a/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets @@ -7,6 +7,11 @@ true + + + true + + true diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.AutoInitializer.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.AutoInitializer.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.AutoInitializer.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.AutoInitializer.targets diff --git a/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets new file mode 100644 index 0000000000..c703002926 --- /dev/null +++ b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets @@ -0,0 +1,67 @@ + + + + + <_WindowsAppSDKBasePlatform Condition="'$(Platform)' == 'Win32'">x86 + <_WindowsAppSDKBasePlatform Condition="'$(Platform)' != 'Win32'">$(Platform) + + + + + + $(MSBuildThisFileDirectory)..\..\include;%(AdditionalIncludeDirectories) + + + + + + + $(MSBuildThisFileDirectory)..\..\lib\win10-$(_WindowsAppSDKBasePlatform)\Microsoft.WindowsAppRuntime.Bootstrap.lib;%(AdditionalDependencies) + + + + + + <_WindowsAppSDKMinTPV Condition="'$(WindowsTargetPlatformMinVersion)' != ''">$(WindowsTargetPlatformMinVersion) + <_WindowsAppSDKMinTPV Condition="'$(_WindowsAppSDKMinTPV)' == '' and '$(WindowsTargetPlatformVersion)' != ''">$(WindowsTargetPlatformVersion) + <_WindowsAppSDKMinTPV Condition="'$(_WindowsAppSDKMinTPV)' == ''">$(TargetPlatformVersion) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.Bootstrap.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Bootstrap.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.Bootstrap.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Bootstrap.targets diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.CompatibilitySetter.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.CompatibilitySetter.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.CompatibilitySetter.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.CompatibilitySetter.targets diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.DeploymentManager.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.DeploymentManager.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.DeploymentManager.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.DeploymentManager.targets diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.targets diff --git a/base/build/Scripts/BLD-BuildBasePackage.ps1 b/base/build/Scripts/BLD-BuildBasePackage.ps1 new file mode 100644 index 0000000000..c6bb6e9178 --- /dev/null +++ b/base/build/Scripts/BLD-BuildBasePackage.ps1 @@ -0,0 +1,71 @@ +param ( + [string]$Channel = "dev" +) + +if (Checkpoint("Update WindowsAppSDK base nuspec [Version]")) { + $WindowsAppSDKNugetPackageVersion = $global:Build_Info.WindowsAppSDKPackageVersion + Write-Host "Update version to $WindowsAppSDKNugetPackageVersion..." + [xml]$publicNuspec = Get-Content -Encoding utf8 -Path (Join-Path $BuildOutput 'NuSpecs\base\Microsoft.WindowsAppSDK.Base.nuspec') + $publicNuspec.package.metadata.version = $WindowsAppSDKNugetPackageVersion + + [xml]$versionsXml = Get-Content (Join-Path $env:Build_SourcesDirectory 'eng\Versions.props') + $buildToolsMSIXPackageVersion = $versionsXml.DocumentElement.PropertyGroup.MicrosoftWindowsSDKBuildToolsMSIXPackageVersion + if (!$buildToolsMSIXPackageVersion) + { + throw "Failed to get Microsoft.Windows.SDK.BuildTools.MSIX Version from Versions.props" + } + + # Update BuildTools.MSIX version number + $dependencies = $publicNuspec.package.metadata.dependencies + $dependency = $dependencies.dependency | Where-Object { $_.id -eq "Microsoft.Windows.SDK.BuildTools.MSIX" } + $dependency.version = $buildToolsMSIXPackageVersion + Write-host $publicNuspec.OuterXml + Set-Content -Encoding utf8 -Value $publicNuspec.OuterXml (Join-Path $BuildOutput 'NuSpecs\base\Microsoft.WindowsAppSDK.Base.nuspec') +} + +if (Checkpoint("Add license to WindowsAppSDK NugetPackage")) { + $LicenseSourceFolder = (Join-Path $env:Build_SourcesDirectory 'build\NuSpecs\license\preview\') + if ($Channel -eq 'stable') + { + $LicenseSourceFolder = (Join-Path $env:Build_SourcesDirectory 'build\NuSpecs\license\release\') + } + + build\scripts\CopyContents.ps1 ` + -SourceDir $LicenseSourceFolder ` + -ContentsList @('license.txt') ` + -TargetDir $BaseNugetContentFolder + + build\scripts\CopyContents.ps1 ` + -SourceDir (Join-Path $env:Build_SourcesDirectory 'build\NuSpecs\') ` + -ContentsList @('NOTICE.txt', 'Icon.png') ` + -TargetDir $BaseNugetContentFolder +} + +if (Checkpoint("Copy nuget build files to WindowsAppSDK Base NugetPackage")) +{ + build\scripts\CopyContents.ps1 ` + -SourceDir (Join-Path $BuildOutput 'NuSpecs\base') ` + -ContentsList @('build') ` + -TargetDir $BaseNugetContentFolder + + build\scripts\CopyContents.ps1 ` + -SourceDir (Join-Path $BuildOutput 'NuSpecs\build') ` + -ContentsList @( + 'Microsoft.WindowsAppSDK.arm64ec.targets', + 'Microsoft.WindowsAppSDK.SelfContained.targets', + 'Microsoft.WindowsAppSDK.SingleFile.targets', + 'Microsoft.WindowsAppSDK.SingleProject.targets') ` + -TargetDir (Join-Path $BaseNugetContentFolder 'build') +} + +if (Checkpoint("Copy build to buildTransitive")) +{ + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BaseNugetContentFolder 'build') ` + -dest (Join-Path $BaseNugetContentFolder 'buildTransitive') +} + +if (Checkpoint("Pack Windows App SDK WindowsAppSDK NugetPackage")) +{ + nuget pack (Join-Path $BuildOutput 'NuSpecs\base\Microsoft.WindowsAppSDK.Base.nuspec') -BasePath $BaseNugetContentFolder -OutputDirectory $PackageStore +} \ No newline at end of file diff --git a/base/build/WindowsAppSDK-BuildBase-Nightly.yml b/base/build/WindowsAppSDK-BuildBase-Nightly.yml new file mode 100644 index 0000000000..d3f2e50ee4 --- /dev/null +++ b/base/build/WindowsAppSDK-BuildBase-Nightly.yml @@ -0,0 +1,149 @@ +##################################################################################################################################### +# OneBranch Pipelines - Official # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: # parameters are shown up in ADO UI in a build queue time +- name: "PushPackageToInternalFeed" + displayName: "Push Windows App SDK Packages To InternalFeed" + type: boolean + default: true +- name: "SignOutput" + displayName: "Sign packages and their contents" + type: boolean + default: true +- name: "ServicingTag" + displayName: "ServicingTag (Runs PayloadTracking's VerifyingServicingRelease if Provided)" + type: string + default: 'PlaceHolder' +- name: runStaticAnalysis + displayName: "Run Static Analysis (e.g., PREFast, APIScan)" + type: boolean + default: true +- name: PublishToMaestro + displayName: "Publish To Maestro" + type: boolean + default: true +- name: BuildType + displayName: "Build Type" + type: string + default: 'experimental' + values: + - 'stable' + - 'experimental' + - 'preview' + +variables: +- template: build\WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates\WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: WindowsAppSDK-Aggregator-TestConfig.yml@WindowsAppSDKConfig +- group: WindowsAppSDK-Build-Variables +# Only the "WinAppSDK-Build-PR (OneBranch)" pipeline is currently prepped for 1ES hosted image validation. +# Hence, EnableTestImageValidation and EnableBuildImageValidation are hardwired to false here, such that +# the pipeline always behaves normally. +- name: EnableTestImageValidation + value: false +- name: EnableBuildImageValidation + value: false + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKAggregator + type: git + name: ProjectReunion/WindowsAppSDKAggregator + ref: refs/heads/main + - repository: WindowsAppSDKSamples + type: github + endpoint: 'GitHub - benkuhn - 2-18' + name: microsoft/WindowsAppSDK-Samples + ref: $(SamplesBranch) + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKVersionConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + +name: $(MajorVersion).$(MinorVersion).$(date:yyMM)$(date:dd).$(Revision)-${{ parameters.BuildType }} + +extends: + template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + parameters: + platform: + name: 'windows_undocked' # windows undocked + + featureFlags: + WindowsHostVersion: + Version: 2022 + Network: R1 + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. + isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed + asyncSdl: # https://aka.ms/obpipelines/asyncsdl + enabled: false + policheck: + exclusionsFile: $(Build.SourcesDirectory)\.config\PolicheckExclusions.xml + binskim: + enabled: true + break: true + # analyzeTargetGlob: -f|**\debug\**\*.dll + + # suppression: + # suppressionFile: $(Build.SourcesDirectory)\.gdn\global.gdnsuppress + + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + # Add "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. + # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. + # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. + severity: Default + # Use "exclusionsFile: <>" to apply a local exclusion file. + apiscan: + # We will enable APIScan on a per-job basis downstream as needed. + enabled: false + # TODO: Once we've cleared away all existing errors, consider setting this to true. + break: false + + # Don't bother to disable tools that are already run by default in SourceAnalysis, because in SourceAnalysis + # those tools target Build.SourcesDirectory by default, while here in BinaryAnalysis they target + # ob_outputDirectory instead, hence, the two rounds may catch different issues. + + stages: + - template: AzurePipelinesTemplates\WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator + parameters: + ServicingTag: ${{ parameters.ServicingTag }} + + - template: base\build\AzurePipelinesTemplates\WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml + parameters: + IsOfficial: false + PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} + SignOutput: ${{ parameters.SignOutput }} + PublishToMaestro: ${{ parameters.PublishToMaestro }} + BuildType : ${{ parameters.BuildType }} + runStaticAnalysis : ${{ parameters.runStaticAnalysis }} diff --git a/base/build/WindowsAppSDK-BuildBase-Official.yml b/base/build/WindowsAppSDK-BuildBase-Official.yml new file mode 100644 index 0000000000..41275edbea --- /dev/null +++ b/base/build/WindowsAppSDK-BuildBase-Official.yml @@ -0,0 +1,148 @@ +##################################################################################################################################### +# OneBranch Pipelines - Official # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: # parameters are shown up in ADO UI in a build queue time +- name: "PushPackageToInternalFeed" + displayName: "Push Windows App SDK Packages To InternalFeed" + type: boolean + default: true +- name: "SignOutput" + displayName: "Sign packages and their contents" + type: boolean + default: true +- name: "ServicingTag" + displayName: "ServicingTag (Runs PayloadTracking's VerifyingServicingRelease if Provided)" + type: string + default: 'PlaceHolder' +- name: runStaticAnalysis + displayName: "Run Static Analysis (e.g., PREFast, APIScan)" + type: boolean + default: true +- name: PublishToMaestro + displayName: "Publish To Maestro" + type: boolean + default: true +- name: BuildType + displayName: "Build Type" + type: string + default: 'experimental' + values: + - 'stable' + - 'experimental' + - 'preview' + +variables: +- template: build\WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates\WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: WindowsAppSDK-Aggregator-TestConfig.yml@WindowsAppSDKConfig +- group: WindowsAppSDK-Build-Variables +# Only the "WinAppSDK-Build-PR (OneBranch)" pipeline is currently prepped for 1ES hosted image validation. +# Hence, EnableTestImageValidation and EnableBuildImageValidation are hardwired to false here, such that +# the pipeline always behaves normally. +- name: EnableTestImageValidation + value: false +- name: EnableBuildImageValidation + value: false + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKAggregator + type: git + name: ProjectReunion/WindowsAppSDKAggregator + ref: refs/heads/main + - repository: WindowsAppSDKSamples + type: github + endpoint: 'GitHub - benkuhn - 2-18' + name: microsoft/WindowsAppSDK-Samples + ref: $(SamplesBranch) + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKVersionConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + +name: $(MajorVersion).$(MinorVersion).$(date:yyMM)$(date:dd).$(Revision)-${{ parameters.BuildType }} + +extends: + template: v2/Microsoft.Official.yml@templates # https://aka.ms/obpipelines/templates + parameters: + platform: + name: 'windows_undocked' # windows undocked + + featureFlags: + WindowsHostVersion: + Version: 2022 + Network: R1 + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. + isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed + asyncSdl: # https://aka.ms/obpipelines/asyncsdl + enabled: false + # suppression: + # suppressionFile: $(Build.SourcesDirectory)\.gdn\global.gdnsuppress + policheck: + exclusionsFile: $(Build.SourcesDirectory)\.config\PolicheckExclusions.xml + binskim: + enabled: true + break: true + # The following serves as an include/exclude example (*untested*). + # analyzeTargetGlob: '+:file|**\bin\**\*.dll;-:file|**\Microsoft.WindowsAppRuntime.Insights.Resource.dll' + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + # Use "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. + # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. + # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. + severity: Default + # Use "exclusionsFile: <>" to apply a local exclusion file. + apiscan: + # We will enable APIScan on a per-job basis downstream as needed. + enabled: false + # TODO: Once we've cleared away all existing errors, consider setting this to true. + break: false + + # Don't bother to disable tools that are already run by default in SourceAnalysis, because in SourceAnalysis + # those tools target Build.SourcesDirectory by default, while here in BinaryAnalysis they target + # ob_outputDirectory instead, hence, the two rounds may catch different issues. + + stages: + - template: AzurePipelinesTemplates\WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator + parameters: + ServicingTag: ${{ parameters.ServicingTag }} + + - template: base\build\AzurePipelinesTemplates\WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml + parameters: + IsOfficial: true + PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} + SignOutput: ${{ parameters.SignOutput }} + PublishToMaestro: ${{ parameters.PublishToMaestro }} + BuildType : ${{ parameters.BuildType }} + runStaticAnalysis : ${{ parameters.runStaticAnalysis }} diff --git a/base/build/WindowsAppSDK-BuildBase-PR.yml b/base/build/WindowsAppSDK-BuildBase-PR.yml new file mode 100644 index 0000000000..3fecd28c9f --- /dev/null +++ b/base/build/WindowsAppSDK-BuildBase-PR.yml @@ -0,0 +1,106 @@ +##################################################################################################################################### +# OneBranch Pipelines - PR # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: # parameters are shown up in ADO UI in a build queue time +- name: BuildType + displayName: "Build Type" + type: string + default: 'experimental' + values: + - 'stable' + - 'experimental' + - 'preview' +- name: runStaticAnalysis + displayName: "Run Static Analysis (e.g., PREFast, APIScan)" + type: boolean + default: true + +variables: +- template: build\WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates\WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKAggregator + type: git + name: ProjectReunion/WindowsAppSDKAggregator + ref: refs/heads/main + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKVersionConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + +name: $(MajorVersion).$(MinorVersion).$(date:yyMM)$(date:dd).$(Revision)-${{ parameters.BuildType }} + +extends: + template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + parameters: + featureFlags: + EnableCDPxPAT: false + WindowsHostVersion: + Version: 2022 + Network: R1 + + platform: + name: 'windows_undocked' # windows undocked + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) + isNativeCode: false + suppression: + suppressionFile: $(Build.SourcesDirectory)\.gdn\OneBranch.gdnsuppress + policheck: + exclusionsFile: $(Build.SourcesDirectory)\.config\PolicheckExclusions.xml + binskim: + enabled: true + break: true + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + severity: Default + apiscan: + enabled: false + break: false + + stages: + - template: AzurePipelinesTemplates\WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator + parameters: + ServicingTag: 'PlaceHolder' + + - template: base\build\AzurePipelinesTemplates\WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml + parameters: + IsOfficial: false + PushPackageToInternalFeed: false + SignOutput: false + PublishToMaestro: false + BuildType: ${{ parameters.BuildType }} + runStaticAnalysis: ${{ parameters.runStaticAnalysis }} diff --git a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj new file mode 100644 index 0000000000..08dd8b0d53 --- /dev/null +++ b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj @@ -0,0 +1,227 @@ + + + + + Ge_SC_Unpkg + x64 + + + RS5_FD_Unpkg + x64 + + + Ge_FD_Unpkg_NoBoot + x64 + + + RS5_FD_Unpkg_NoBoot + x64 + + + H19H1_SC_Pkg + x64 + + + RS5_SC_Pkg_URF + x64 + + + RS5_SC_Pkg_NoURF + x64 + + + RS5_FD_Pkg + x64 + + + RS5_SC_Pkg_URF_Fdn + x64 + + + + + 17.0 + {A1B2C3D4-E5F6-7890-ABCD-EF1234567890} + BasePackageTestCpp + 10.0 + + + + + Application + false + v143 + Unicode + 10.0.26100.0 + true + None + + + + + Application + false + v143 + Unicode + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + <_WindowsAppSDKKeepBootstrapBinaries>true + false + false + false + + + + + Application + false + v143 + Unicode + 10.0.26100.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + + + + + Application + false + v143 + Unicode + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + + + + + Application + false + v143 + Unicode + 10.0.18362.0 + true + true + + + + + Application + false + v143 + Unicode + 10.0.17763.0 + true + true + + + + + Application + false + v143 + Unicode + 10.0.17763.0 + true + true + false + + + + + Application + false + v143 + Unicode + 10.0.17763.0 + false + true + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + false + false + false + + + + + Application + false + v143 + Unicode + 10.0.17763.0 + true + true + true + + + + + + + + + + $(MSBuildProjectDirectory)\out\$(Configuration)\$(Platform)\ + $(MSBuildProjectDirectory)\obj\$(Configuration)\$(Platform)\ + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + stdcpp17 + + + Console + + + + + + + EXPECT_NO_DLLS;%(PreprocessorDefinitions) + + + + + + EXPECT_BOOTSTRAP;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + diff --git a/base/test/BasePackageTest/CPP/Directory.Build.props b/base/test/BasePackageTest/CPP/Directory.Build.props new file mode 100644 index 0000000000..5f9708a97f --- /dev/null +++ b/base/test/BasePackageTest/CPP/Directory.Build.props @@ -0,0 +1,5 @@ + + + false + + diff --git a/base/test/BasePackageTest/CPP/main.cpp b/base/test/BasePackageTest/CPP/main.cpp new file mode 100644 index 0000000000..bd73890f96 --- /dev/null +++ b/base/test/BasePackageTest/CPP/main.cpp @@ -0,0 +1,79 @@ +// Validates Base package binplacement behavior for different configurations. +// EXPECT_NO_DLLS: No DLLs expected alongside the exe. +// EXPECT_BOOTSTRAP: Bootstrap DLL MUST be present alongside the exe. +#include +#include +#include +#include +#include +#include + +namespace fs = std::filesystem; + +int main() +{ + wchar_t exePath[MAX_PATH]; + GetModuleFileNameW(nullptr, exePath, MAX_PATH); + fs::path exeDir = fs::path(exePath).parent_path(); + + std::wcout << L"BasePackageTestCpp output dir: " << exeDir.wstring() << std::endl; + + std::vector foundDlls; + for (const auto& entry : fs::directory_iterator(exeDir)) + { + if (entry.is_regular_file()) + { + auto ext = entry.path().extension().wstring(); + std::transform(ext.begin(), ext.end(), ext.begin(), ::towlower); + if (ext == L".dll") + { + foundDlls.push_back(entry.path().filename().wstring()); + } + } + } + + std::wcout << L"DLLs found: " << foundDlls.size() << std::endl; + for (const auto& dll : foundDlls) + { + std::wcout << L" " << dll << std::endl; + } + + int exitCode = 0; + +#ifdef EXPECT_NO_DLLS + std::wcout << L"\n[Expecting: no DLLs]" << std::endl; + if (!foundDlls.empty()) + { + std::wcerr << L"FAIL: No DLLs should be present alongside a SelfContained/Packaged exe." << std::endl; + exitCode = 1; + } + else + { + std::wcout << L"PASS: No DLLs found alongside the exe." << std::endl; + } +#elif defined(EXPECT_BOOTSTRAP) + std::wcout << L"\n[Expecting: bootstrap DLL present]" << std::endl; + bool foundBootstrap = false; + for (const auto& dll : foundDlls) + { + auto lower = dll; + std::transform(lower.begin(), lower.end(), lower.begin(), ::towlower); + if (lower == L"microsoft.windowsappruntime.bootstrap.dll") + { + foundBootstrap = true; + break; + } + } + if (!foundBootstrap) + { + std::wcerr << L"FAIL: Microsoft.WindowsAppRuntime.Bootstrap.dll not found alongside exe." << std::endl; + exitCode = 1; + } + else + { + std::wcout << L"PASS: Bootstrap DLL is present as expected." << std::endl; + } +#endif + + return exitCode; +} diff --git a/base/test/BasePackageTest/CPP/nuget.config b/base/test/BasePackageTest/CPP/nuget.config new file mode 100644 index 0000000000..b383ca72d4 --- /dev/null +++ b/base/test/BasePackageTest/CPP/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/base/test/BasePackageTest/CPP/packages.config b/base/test/BasePackageTest/CPP/packages.config new file mode 100644 index 0000000000..7e57e2be04 --- /dev/null +++ b/base/test/BasePackageTest/CPP/packages.config @@ -0,0 +1,4 @@ + + + + diff --git a/base/test/BasePackageTest/CS/BasePackageTest.csproj b/base/test/BasePackageTest/CS/BasePackageTest.csproj new file mode 100644 index 0000000000..20586d8a3f --- /dev/null +++ b/base/test/BasePackageTest/CS/BasePackageTest.csproj @@ -0,0 +1,128 @@ + + + + Exe + x64 + win-x64 + AnyCPU;x64 + Ge_SC_Unpkg;RS5_FD_Unpkg;Ge_FD_Unpkg_NoBoot;RS5_FD_Unpkg_NoBoot;H19H1_SC_Pkg;RS5_SC_Pkg_URF;RS5_SC_Pkg_NoURF;RS5_FD_Pkg;RS5_SC_Pkg_URF_Fdn + + + + + net8.0-windows10.0.26100.0 + 10.0.26100.0 + true + None + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + <_WindowsAppSDKKeepBootstrapBinaries>true + false + false + false + EXPECT_BOOTSTRAP + + + + + net8.0-windows10.0.26100.0 + 10.0.26100.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + + + + + net8.0-windows10.0.18362.0 + 10.0.18362.0 + true + MSIX + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + true + MSIX + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + true + MSIX + false + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + false + MSIX + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + false + false + false + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + true + MSIX + $(NoWarn);NU1605 + + + + + + + + + + + + diff --git a/base/test/BasePackageTest/CS/BasePackageTest.sln b/base/test/BasePackageTest/CS/BasePackageTest.sln new file mode 100644 index 0000000000..8ec2fcef48 --- /dev/null +++ b/base/test/BasePackageTest/CS/BasePackageTest.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 18 +VisualStudioVersion = 18.3.11520.95 d18.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasePackageTest", "BasePackageTest.csproj", "{13B4E760-EC65-9A64-419F-C6CEC70B3E18}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|x64.ActiveCfg = Debug|x64 + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|x64.Build.0 = Debug|x64 + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|Any CPU.Build.0 = Release|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|x64.ActiveCfg = Release|x64 + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {92C3F6F9-C58B-44FB-BF56-C8ED4418776F} + EndGlobalSection +EndGlobal diff --git a/base/test/BasePackageTest/CS/Directory.Build.props b/base/test/BasePackageTest/CS/Directory.Build.props new file mode 100644 index 0000000000..5f9708a97f --- /dev/null +++ b/base/test/BasePackageTest/CS/Directory.Build.props @@ -0,0 +1,5 @@ + + + false + + diff --git a/base/test/BasePackageTest/CS/Program.cs b/base/test/BasePackageTest/CS/Program.cs new file mode 100644 index 0000000000..b24a734d18 --- /dev/null +++ b/base/test/BasePackageTest/CS/Program.cs @@ -0,0 +1,72 @@ +// Validates Base package binplacement behavior for different configurations. +// EXPECT_NO_BOOTSTRAP: Only app DLLs expected, no bootstrap. +// EXPECT_BOOTSTRAP: Bootstrap DLLs MUST be present. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +var exeDir = AppContext.BaseDirectory; +Console.WriteLine($"BasePackageTest output dir: {exeDir}"); + +var allDlls = Directory.GetFiles(exeDir, "*.dll") + .Select(Path.GetFileName) + .OrderBy(x => x, StringComparer.OrdinalIgnoreCase) + .ToList()!; + +Console.WriteLine($"DLLs found: {allDlls.Count}"); +foreach (var dll in allDlls) +{ + Console.WriteLine($" {dll}"); +} + +int exitCode = 0; + +#if EXPECT_NO_BOOTSTRAP +Console.WriteLine("\n[Expecting: no bootstrap DLLs]"); +var allowedDlls = new HashSet(StringComparer.OrdinalIgnoreCase) +{ + "BasePackageTest.dll", + "Microsoft.Windows.SDK.NET.dll", + "WinRT.Runtime.dll" +}; + +var unexpected = allDlls.Where(d => !allowedDlls.Contains(d!)).ToList(); +if (unexpected.Count > 0) +{ + Console.Error.WriteLine("FAIL: Unexpected DLLs found:"); + foreach (var dll in unexpected) + Console.Error.WriteLine($" {dll}"); + exitCode = 1; +} +else +{ + Console.WriteLine("PASS: Only expected DLLs present (no bootstrap)."); +} + +#elif EXPECT_BOOTSTRAP +Console.WriteLine("\n[Expecting: bootstrap DLLs present]"); +var requiredBootstrapDlls = new[] +{ + "Microsoft.WindowsAppRuntime.Bootstrap.dll", + "Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" +}; + +var missingBootstrap = requiredBootstrapDlls + .Where(r => !allDlls.Any(d => string.Equals(d, r, StringComparison.OrdinalIgnoreCase))) + .ToList(); + +if (missingBootstrap.Count > 0) +{ + Console.Error.WriteLine("FAIL: Expected bootstrap DLLs not found:"); + foreach (var dll in missingBootstrap) + Console.Error.WriteLine($" {dll}"); + exitCode = 1; +} +else +{ + Console.WriteLine("PASS: Bootstrap DLLs are present as expected."); +} +#endif + +return exitCode; diff --git a/base/test/BasePackageTest/CS/nuget.config b/base/test/BasePackageTest/CS/nuget.config new file mode 100644 index 0000000000..d88d4c7a25 --- /dev/null +++ b/base/test/BasePackageTest/CS/nuget.config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/base/test/RunBasePackageTests.ps1 b/base/test/RunBasePackageTests.ps1 new file mode 100644 index 0000000000..dcc82b0f58 --- /dev/null +++ b/base/test/RunBasePackageTests.ps1 @@ -0,0 +1,252 @@ +# RunBasePackageTests.ps1 +# Builds all Base package test configurations and verifies results. +# Usage: .\base\test\RunBasePackageTests.ps1 +param( + [string]$MsBuildPath = "F:\Program Files\Microsoft Visual Studio\18\Insiders\MSBuild\Current\Bin\MSBuild.exe" +) + +Set-StrictMode -Version 3.0 +$ErrorActionPreference = 'Continue' +$script:PassCount = 0 +$script:FailCount = 0 + +function Test-BuildSuccess { + param([string]$Name, [string]$BuildCmd, [scriptblock]$Verify) + + Write-Host "`n========== $Name ==========" -ForegroundColor Cyan + Write-Host "Building..." + + $output = Invoke-Expression $BuildCmd 2>&1 | Out-String + $exitCode = $LASTEXITCODE + + if ($exitCode -ne 0) { + Write-Host "FAIL: Build failed (exit code $exitCode)" -ForegroundColor Red + Write-Host $output | Select-Object -Last 10 + $script:FailCount++ + return + } + + # Run verification + $result = & $Verify + if ($result) { + Write-Host "PASS" -ForegroundColor Green + $script:PassCount++ + } else { + $script:FailCount++ + } +} + +function Test-BuildError { + param([string]$Name, [string]$BuildCmd, [string]$ExpectedError) + + Write-Host "`n========== $Name (expect error) ==========" -ForegroundColor Cyan + Write-Host "Building (expecting failure)..." + + $output = Invoke-Expression $BuildCmd 2>&1 | Out-String + $exitCode = $LASTEXITCODE + + if ($exitCode -eq 0) { + Write-Host "FAIL: Build succeeded but should have failed" -ForegroundColor Red + $script:FailCount++ + return + } + + if ($output -match [regex]::Escape($ExpectedError)) { + Write-Host "PASS: Got expected error" -ForegroundColor Green + $script:PassCount++ + } else { + Write-Host "FAIL: Build failed but with wrong error" -ForegroundColor Red + Write-Host "Expected: $ExpectedError" -ForegroundColor Yellow + # Show error lines + $output -split "`n" | Where-Object { $_ -match "error" } | Select-Object -First 5 | ForEach-Object { Write-Host " $_" } + $script:FailCount++ + } +} + +function Test-NoDlls { + param([string]$Dir, [string[]]$AllowedDlls = @()) + + $dlls = @(Get-ChildItem "$Dir\*.dll" -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }) + $unexpected = @($dlls | Where-Object { $_ -notin $AllowedDlls }) + + if ($unexpected.Count -gt 0) { + Write-Host "FAIL: Unexpected DLLs found:" -ForegroundColor Red + $unexpected | ForEach-Object { Write-Host " $_" -ForegroundColor Red } + return $false + } + Write-Host " DLLs: $($dlls.Count) (all expected)" + return $true +} + +function Test-HasBootstrapDlls { + param([string]$Dir, [switch]$Managed) + + $dlls = Get-ChildItem "$Dir\*.dll" -ErrorAction SilentlyContinue | ForEach-Object { $_.Name } + $hasNative = $dlls -contains "Microsoft.WindowsAppRuntime.Bootstrap.dll" + $hasManaged = !$Managed -or ($dlls -contains "Microsoft.WindowsAppRuntime.Bootstrap.Net.dll") + + if (!$hasNative) { + Write-Host "FAIL: Microsoft.WindowsAppRuntime.Bootstrap.dll not found" -ForegroundColor Red + return $false + } + if ($Managed -and !$hasManaged) { + Write-Host "FAIL: Microsoft.WindowsAppRuntime.Bootstrap.Net.dll not found" -ForegroundColor Red + return $false + } + Write-Host " Bootstrap DLLs present" + return $true +} + +# ============================================================ +Write-Host "Base Package Test Suite" -ForegroundColor White +Write-Host "======================" -ForegroundColor White + +$csProj = "base\test\BasePackageTest\CS\BasePackageTest.csproj" +$cppProj = "base\test\BasePackageTest\CPP\BasePackageTestCpp.vcxproj" + +# Clean previous outputs +Write-Host "`nCleaning..." +cmd /c "rd /s /q base\test\BasePackageTest\CS\bin 2>nul" +cmd /c "rd /s /q base\test\BasePackageTest\CS\obj 2>nul" +cmd /c "rd /s /q base\test\BasePackageTest\CPP\out 2>nul" +cmd /c "rd /s /q base\test\BasePackageTest\CPP\obj 2>nul" + +# Ensure C++ NuGet packages are restored +Write-Host "Restoring C++ NuGet packages..." +cmd /c "rd /s /q base\test\BasePackageTest\CPP\packages 2>nul" +cmd /c "rd /s /q Packages\microsoft.windowsappsdk.base 2>nul" +nuget restore base\test\BasePackageTest\CPP\packages.config -PackagesDirectory base\test\BasePackageTest\CPP\packages -ConfigFile base\test\BasePackageTest\CPP\nuget.config 2>&1 | Out-Null + +# ============================================================ +# C# Tests +# ============================================================ +Write-Host "`n" -NoNewline +Write-Host "===== C# Tests =====" -ForegroundColor White + +# Config 1: Ge_SC_Unpkg — no bootstrap DLLs +$csAllowed = @("BasePackageTest.dll", "Microsoft.Windows.SDK.NET.dll", "WinRT.Runtime.dll") +Test-BuildSuccess "C# 1: Ge_SC_Unpkg" ` + "dotnet build $csProj -c Ge_SC_Unpkg --no-incremental -v q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\Ge_SC_Unpkg\net8.0-windows10.0.26100.0\win-x64" -AllowedDlls $csAllowed } + +# Config 2: RS5_FD_Unpkg — bootstrap DLLs present +dotnet restore $csProj -p:Configuration=RS5_FD_Unpkg 2>&1 | Out-Null +Test-BuildSuccess "C# 2: RS5_FD_Unpkg" ` + "dotnet build $csProj -c RS5_FD_Unpkg --no-incremental --no-restore -v q 2>&1" ` + { Test-HasBootstrapDlls "base\test\BasePackageTest\CS\bin\x64\RS5_FD_Unpkg\net8.0-windows10.0.17763.0\win-x64" -Managed } + +# Config 3: Ge_FD_Unpkg_NoBoot — no bootstrap DLLs +dotnet restore $csProj -p:Configuration=Ge_FD_Unpkg_NoBoot 2>&1 | Out-Null +Test-BuildSuccess "C# 3: Ge_FD_Unpkg_NoBoot" ` + "dotnet build $csProj -c Ge_FD_Unpkg_NoBoot --no-incremental --no-restore -v q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\Ge_FD_Unpkg_NoBoot\net8.0-windows10.0.26100.0\win-x64" -AllowedDlls $csAllowed } + +# Config 4: RS5_FD_Unpkg_NoBoot — ERROR expected +dotnet restore $csProj -p:Configuration=RS5_FD_Unpkg_NoBoot 2>&1 | Out-Null +Test-BuildError "C# 4: RS5_FD_Unpkg_NoBoot" ` + "dotnet build $csProj -c RS5_FD_Unpkg_NoBoot --no-incremental --no-restore -v q 2>&1" ` + "The Windows App SDK Bootstrapper is required for framework-dependent unpackaged apps" + +# Config 5: H19H1_SC_Pkg — no bootstrap DLLs +dotnet restore $csProj -p:Configuration=H19H1_SC_Pkg 2>&1 | Out-Null +Test-BuildSuccess "C# 5: H19H1_SC_Pkg" ` + "dotnet build $csProj -c H19H1_SC_Pkg --no-incremental --no-restore -v q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\H19H1_SC_Pkg\net8.0-windows10.0.18362.0\win-x64" -AllowedDlls $csAllowed } + +# Config 6: RS5_SC_Pkg_URF — ERROR expected (Foundation required) +dotnet restore $csProj -p:Configuration=RS5_SC_Pkg_URF 2>&1 | Out-Null +Test-BuildError "C# 6: RS5_SC_Pkg_URF" ` + "dotnet build $csProj -c RS5_SC_Pkg_URF --no-incremental --no-restore -v q 2>&1" ` + "Undocked Reg-Free WinRT activation requires the Microsoft.WindowsAppSDK.Foundation package" + +# Config 7: RS5_SC_Pkg_NoURF — ERROR expected (URF not optional) +dotnet restore $csProj -p:Configuration=RS5_SC_Pkg_NoURF 2>&1 | Out-Null +Test-BuildError "C# 7: RS5_SC_Pkg_NoURF" ` + "dotnet build $csProj -c RS5_SC_Pkg_NoURF --no-incremental --no-restore -v q 2>&1" ` + "Undocked Reg-Free WinRT activation is required for self-contained apps targeting Windows versions prior to 10.0.18362.0" + +# Config 8: RS5_FD_Pkg — no bootstrap DLLs +dotnet restore $csProj -p:Configuration=RS5_FD_Pkg 2>&1 | Out-Null +Test-BuildSuccess "C# 8: RS5_FD_Pkg" ` + "dotnet build $csProj -c RS5_FD_Pkg --no-incremental --no-restore -v q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\RS5_FD_Pkg\net8.0-windows10.0.17763.0\win-x64" -AllowedDlls $csAllowed } + +# Config 9: RS5_SC_Pkg_URF_Fdn — Foundation referenced, URF=true, no bootstrap DLLs +# Foundation adds extra DLLs but bootstrap should still be absent (SC=true) +dotnet restore $csProj -p:Configuration=RS5_SC_Pkg_URF_Fdn 2>&1 | Out-Null +Test-BuildSuccess "C# 9: RS5_SC_Pkg_URF_Fdn" ` + "dotnet build $csProj -c RS5_SC_Pkg_URF_Fdn --no-incremental --no-restore -v q 2>&1" ` + { + $dir = "base\test\BasePackageTest\CS\bin\x64\RS5_SC_Pkg_URF_Fdn\net8.0-windows10.0.17763.0\win-x64" + $dlls = @(Get-ChildItem "$dir\*.dll" -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }) + $bootstrapDlls = @($dlls | Where-Object { $_ -match "Bootstrap" }) + if ($bootstrapDlls.Count -gt 0) { + Write-Host "FAIL: Bootstrap DLLs found:" -ForegroundColor Red + $bootstrapDlls | ForEach-Object { Write-Host " $_" -ForegroundColor Red } + return $false + } + Write-Host " DLLs: $($dlls.Count) (no bootstrap, Foundation present)" + return $true + } + +# ============================================================ +# C++ Tests +# ============================================================ +Write-Host "`n" -NoNewline +Write-Host "===== C++ Tests =====" -ForegroundColor White + +$msbuild = "`"$MsBuildPath`"" + +# Config 1: Ge_SC_Unpkg — no DLLs +Test-BuildSuccess "C++ 1: Ge_SC_Unpkg" ` + "& $msbuild $cppProj /p:Configuration=Ge_SC_Unpkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\Ge_SC_Unpkg\x64" } + +# Config 2: RS5_FD_Unpkg — bootstrap DLL present +Test-BuildSuccess "C++ 2: RS5_FD_Unpkg" ` + "& $msbuild $cppProj /p:Configuration=RS5_FD_Unpkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-HasBootstrapDlls "base\test\BasePackageTest\CPP\out\RS5_FD_Unpkg\x64" } + +# Config 3: Ge_FD_Unpkg_NoBoot — no DLLs +Test-BuildSuccess "C++ 3: Ge_FD_Unpkg_NoBoot" ` + "& $msbuild $cppProj /p:Configuration=Ge_FD_Unpkg_NoBoot /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\Ge_FD_Unpkg_NoBoot\x64" } + +# Config 4: RS5_FD_Unpkg_NoBoot — ERROR expected +Test-BuildError "C++ 4: RS5_FD_Unpkg_NoBoot" ` + "& $msbuild $cppProj /p:Configuration=RS5_FD_Unpkg_NoBoot /p:Platform=x64 /nr:false /v:q 2>&1" ` + "The Windows App SDK Bootstrapper is required for framework-dependent unpackaged apps" + +# Config 5: H19H1_SC_Pkg — no DLLs +Test-BuildSuccess "C++ 5: H19H1_SC_Pkg" ` + "& $msbuild $cppProj /p:Configuration=H19H1_SC_Pkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\H19H1_SC_Pkg\x64" } + +# Config 6: RS5_SC_Pkg_URF — ERROR expected (Foundation required) +Test-BuildError "C++ 6: RS5_SC_Pkg_URF" ` + "& $msbuild $cppProj /p:Configuration=RS5_SC_Pkg_URF /p:Platform=x64 /nr:false /v:q 2>&1" ` + "Undocked Reg-Free WinRT activation requires the Microsoft.WindowsAppSDK.Foundation package" + +# Config 7: RS5_SC_Pkg_NoURF — ERROR expected (URF not optional) +Test-BuildError "C++ 7: RS5_SC_Pkg_NoURF" ` + "& $msbuild $cppProj /p:Configuration=RS5_SC_Pkg_NoURF /p:Platform=x64 /nr:false /v:q 2>&1" ` + "Undocked Reg-Free WinRT activation is required for self-contained apps targeting Windows versions prior to 10.0.18362.0" + +# Config 8: RS5_FD_Pkg — no DLLs +Test-BuildSuccess "C++ 8: RS5_FD_Pkg" ` + "& $msbuild $cppProj /p:Configuration=RS5_FD_Pkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\RS5_FD_Pkg\x64" } + +# Config 9: RS5_SC_Pkg_URF_Fdn — Foundation simulated, URF=true, no DLLs +Test-BuildSuccess "C++ 9: RS5_SC_Pkg_URF_Fdn" ` + "& $msbuild $cppProj /p:Configuration=RS5_SC_Pkg_URF_Fdn /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\RS5_SC_Pkg_URF_Fdn\x64" } + +# ============================================================ +# Summary +# ============================================================ +Write-Host "`n======================" -ForegroundColor White +Write-Host "Results: $script:PassCount passed, $script:FailCount failed" -ForegroundColor $(if ($script:FailCount -eq 0) { "Green" } else { "Red" }) +Write-Host "======================" -ForegroundColor White + +exit $script:FailCount diff --git a/build/CopyFilesToStagingDir.ps1 b/build/CopyFilesToStagingDir.ps1 index 487e5a62fa..af0e304e88 100644 --- a/build/CopyFilesToStagingDir.ps1 +++ b/build/CopyFilesToStagingDir.ps1 @@ -159,7 +159,7 @@ PublishFile $OverrideDir\DynamicDependency-Override.json $NugetDir\runtimes\win1 PublishFile $OverrideDir\PushNotifications-Override.json $NugetDir\runtimes\win10-$Platform\native # # Includes (*.h) -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h $NugetDir\include +# MddBootstrap.h has moved to the Base package. PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\decimal.h $NugetDir\include PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\decimalcppwinrt.h $NugetDir\include PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\MsixDynamicDependency.h $NugetDir\include @@ -170,7 +170,7 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntime.SelfContain PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Security.AccessControl.h $NugetDir\include\ # # Libraries (*.lib) -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\Microsoft.WindowsAppRuntime.Bootstrap.lib $NugetDir\lib\win10-$Platform +# Microsoft.WindowsAppRuntime.Bootstrap.lib has moved to the Base package. PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Microsoft.WindowsAppRuntime.lib $NugetDir\lib\win10-$Platform # # MSIX Framework package - DLLs/EXEs @@ -205,8 +205,7 @@ PublishFile $FullBuildOutput\DynamicDependencyLifetimeManager.ProxyStub\DynamicD PublishFile $FullBuildOutput\DynamicDependencyLifetimeManager.ProxyStub\DynamicDependencyLifetimeManager.ProxyStub.pdb $NugetDir\runtimes\win10-$Platform\native # # Native (not managed, AppLocal / no MSIX) -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\Microsoft.WindowsAppRuntime.Bootstrap.dll $NugetDir\runtimes\win-$Platform\native -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\Microsoft.WindowsAppRuntime.Bootstrap.pdb $NugetDir\runtimes\win-$Platform\native +# Microsoft.WindowsAppRuntime.Bootstrap.dll/pdb have moved to the Base package. PublishFile $FullBuildOutput\WindowsAppRuntime_UniversalBGTaskDLL\Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.dll $NugetDir\runtimes\win-$Platform\native PublishFile $FullBuildOutput\WindowsAppRuntime_UniversalBGTaskDLL\Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.pdb $NugetDir\runtimes\win-$Platform\native # @@ -230,21 +229,7 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windo PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.System.winmd $NugetDir\lib\uap10.0 PublishFile $FullBuildOutput\WindowsAppRuntime_UniversalBGTaskDLL\Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.winmd $NugetDir\lib\uap10.0 # -# Common Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeAutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeAutoInitializer.cs $NugetDir\include -# -# Bootstrap Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cs $NugetDir\include -# -# DeploymentManager Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\DeploymentManagerAutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\DeploymentManagerAutoInitializer.cs $NugetDir\include -# -# UndockedRegFreeWinRT (URFW) Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\UndockedRegFreeWinRT-AutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\UndockedRegFreeWinRT-AutoInitializer.cs $NugetDir\include +# Auto-initializer files have moved to the Base package. # # Build overrides PublishFile $OverrideDir\DynamicDependency-Override.json $NugetDir\runtimes\win10-$Platform\native diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets b/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets index 925af86b05..0548e754b4 100644 --- a/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets +++ b/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets @@ -2,22 +2,7 @@ - - + - - - - - - - - - - - - - - diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props b/build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props b/build/NuSpecs/native/Microsoft.WindowsAppSDK.WinRt.props similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.WinRt.props diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.props b/build/NuSpecs/native/Microsoft.WindowsAppSDK.props similarity index 70% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.props rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.props index a6d213979f..68a5d91c8a 100644 --- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.props +++ b/build/NuSpecs/native/Microsoft.WindowsAppSDK.props @@ -2,6 +2,6 @@ - - + + diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets b/build/NuSpecs/native/Microsoft.WindowsAppSDK.targets similarity index 84% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.targets rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.targets index b0cc42dcec..f2ff9e858e 100644 --- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets +++ b/build/NuSpecs/native/Microsoft.WindowsAppSDK.targets @@ -159,18 +159,6 @@ - - - - - - - - - - - - - + From 84f13d5a581f96a286e2900f2f138967544c0694 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 12 Mar 2026 15:46:27 -0400 Subject: [PATCH 02/41] Fix Base PR pipeline template paths - Remove WindowsAppSDKAggregator repo resource and PayloadTrackingTool stage - Fix CommonVariables path: ../../build/WindowsAppSDK-CommonVariables.yml - Fix Stages template ref: AzurePipelinesTemplates/...@self - Fix SetupBuildEnvironment path: ../../../build/AzurePipelinesTemplates/... Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml | 2 +- base/build/WindowsAppSDK-BuildBase-PR.yml | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml index dbbeee99a2..fa3b38c6ec 100644 --- a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -132,7 +132,7 @@ stages: echo TestImageToValidate : $(TestImageToValidate) displayName: 'Variables' - - template: build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml + - template: ../../../build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml parameters: BuildType: ${{ parameters.BuildType }} diff --git a/base/build/WindowsAppSDK-BuildBase-PR.yml b/base/build/WindowsAppSDK-BuildBase-PR.yml index 3fecd28c9f..7a834ec940 100644 --- a/base/build/WindowsAppSDK-BuildBase-PR.yml +++ b/base/build/WindowsAppSDK-BuildBase-PR.yml @@ -32,8 +32,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time default: true variables: -- template: build\WindowsAppSDK-CommonVariables.yml -- template: AzurePipelinesTemplates\WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: ../../build/WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates/WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig - template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig resources: @@ -42,10 +42,6 @@ resources: type: git name: OneBranch.Pipelines/GovernedTemplates ref: refs/heads/main - - repository: WindowsAppSDKAggregator - type: git - name: ProjectReunion/WindowsAppSDKAggregator - ref: refs/heads/main - repository: WindowsAppSDKConfig type: git name: ProjectReunion/WindowsAppSDKConfig @@ -92,11 +88,7 @@ extends: break: false stages: - - template: AzurePipelinesTemplates\WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator - parameters: - ServicingTag: 'PlaceHolder' - - - template: base\build\AzurePipelinesTemplates\WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml + - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self parameters: IsOfficial: false PushPackageToInternalFeed: false From e88080a476602cd7036d489dc3e6e6e231e2751f Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 12 Mar 2026 15:53:57 -0400 Subject: [PATCH 03/41] Fix SetupBuildEnvironment parameter - only accepts IsOneBranch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml index fa3b38c6ec..4be21c8fef 100644 --- a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -133,8 +133,6 @@ stages: displayName: 'Variables' - template: ../../../build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml - parameters: - BuildType: ${{ parameters.BuildType }} - task: UseDotNet@2 continueOnError: true From 8468f980ed655b113b839245d841a4c78395011b Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 12 Mar 2026 16:25:57 -0400 Subject: [PATCH 04/41] Fix build name and version: use CommonVariables version - name: use from CommonVariables (not ) - DetermineNugetPackageVersion: use instead of Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...wsAppSDK-BuildWindowsAppSDKBase-Stages.yml | 47 ++++++++----------- base/build/WindowsAppSDK-BuildBase-PR.yml | 2 +- 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml index 4be21c8fef..723a7652a2 100644 --- a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -149,33 +149,12 @@ stages: inputs: targetType: 'inline' script: | - $paddedRevision = '$(Revision)' - if([int]$(Revision) -lt 10) - { - $paddedRevision = '00' + '$(Revision)' - } - elseif ([int]$(Revision) -lt 100) - { - $paddedRevision = '0' + '$(Revision)' - } - Write-Host "paddedRevision " $paddedRevision - - if ([int]$(Revision) -gt 999) - { - Write-Host "Revision Number limit reach. Please try again the next day" - Write-Host "##vso[task.complete result=Failed;]DONE" - } - - $buildType = '${{ parameters.BuildType }}' - $majorMinorPatchRev = '$(MajorVersion).$(MinorVersion).$(PatchVersion)' - $majorMinorPatchRev = $majorMinorPatchRev + $paddedRevision - $version = $majorMinorPatchRev + '-' + $buildType - - # If using release versioning, drop the version suffix, which includes a tag & build stamp. - # This should only be done when prepping final release packages. + $version = '$(version)' + # For official builds, allow VersionTag override if ('${{ parameters.IsOfficial }}' -eq 'true') { + $buildType = '${{ parameters.BuildType }}' $versionTag = '$(VersionTag)' # Allow override from pipeline variable @@ -203,16 +182,28 @@ stages: Write-Host "##vso[task.complete result=Failed;]DONE" } - $formattedTag = '' if(-not [String]::IsNullOrEmpty($versionTag)) { - $formattedTag = '-' + $versionTag + # Replace the prerelease tag portion of the version + $dashIndex = $version.IndexOf('-') + if ($dashIndex -gt 0) { + $version = $version.Substring(0, $dashIndex) + '-' + $versionTag + } else { + $version = $version + '-' + $versionTag + } + } + elseif ($buildType -eq "stable") + { + # Stable: strip prerelease tag entirely + $dashIndex = $version.IndexOf('-') + if ($dashIndex -gt 0) { + $version = $version.Substring(0, $dashIndex) + } } Write-Host "Using Release Versioning" - $version = $majorMinorPatchRev + $formattedTag } - # Write the version we generated here to Version.Details.xml for BuildAll.ps1 to read from + # Write the version to Version.Details.xml for BuildAll.ps1 to read from [xml]$versionDetailsPath = Get-Content -Path "eng\Version.Details.xml" $WindowsAppSDKConfigVersionDependency = $versionDetailsPath.Dependencies.ToolsetDependencies.Dependency | Where-Object { $_.Name -eq "Microsoft.WindowsAppSDK.Version" } $WindowsAppSDKConfigVersionDependency.Version = $version diff --git a/base/build/WindowsAppSDK-BuildBase-PR.yml b/base/build/WindowsAppSDK-BuildBase-PR.yml index 7a834ec940..75bc4f88f7 100644 --- a/base/build/WindowsAppSDK-BuildBase-PR.yml +++ b/base/build/WindowsAppSDK-BuildBase-PR.yml @@ -51,7 +51,7 @@ resources: name: ProjectReunion/WindowsAppSDKConfig ref: refs/heads/main -name: $(MajorVersion).$(MinorVersion).$(date:yyMM)$(date:dd).$(Revision)-${{ parameters.BuildType }} +name: $(version) extends: template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates From e947e7479b4e66899f5da49f3164c9476f86af08 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 12 Mar 2026 17:24:59 -0400 Subject: [PATCH 05/41] Add BuildBaseFoundation step to build Bootstrap binaries for Base package - Add new BuildBaseFoundation step to BuildAll.ps1 that builds only WindowsAppRuntime_DLL and WindowsAppRuntime_BootstrapDLL from the solution (plus Bootstrap.Net for AnyCPU) - Update StageBaseFiles to copy auto-initializer source files directly from their source locations instead of build output - Add BuildBaseFoundation task to Base PR pipeline before StageBaseFiles Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 92 +++++++++++++++---- ...wsAppSDK-BuildWindowsAppSDKBase-Stages.yml | 7 ++ 2 files changed, 79 insertions(+), 20 deletions(-) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index e3f73b3ae1..a1c30aafee 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -493,6 +493,65 @@ Try { Copy-Item -Path $IntellisenseFile -Destination $DestinationDir } } + if ($AzureBuildStep -eq "BuildBaseFoundation") + { + #------------------ + # Build the minimal Foundation projects needed for the Base package: + # WindowsAppRuntime_DLL (for .lib) and WindowsAppRuntime_BootstrapDLL (for Bootstrap.dll) + #------------------ + NugetRestore "WindowsAppRuntime" "WindowsAppRuntime.sln" + NugetRestore "Microsoft.WindowsAppRuntime.Bootstrap.Net" "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" + + foreach($configurationToRun in $configuration.Split(",")) + { + foreach($platformToRun in $platform.Split(",")) + { + write-host "Building WindowsAppRuntime_DLL for Base: $configurationToRun|$platformToRun" + & $msBuildPath /restore ` + WindowsAppRuntime.sln ` + /t:WindowsAppRuntime_DLL ` + /p:Configuration=$configurationToRun ` + /p:Platform=$platformToRun ` + /p:RestoreConfigFile=NuGet.config ` + /binaryLogger:"BuildOutput/binlogs/WindowsAppRuntime_DLL.$platformToRun.$configurationToRun.binlog" ` + $WindowsAppSDKVersionProperty ` + /p:WindowsAppSDKCleanIntermediateFiles=true ` + /p:AppxSymbolPackageEnabled=false ` + /p:WindowsAppSDKBuildPipeline=$WindowsAppSDKBuildPipeline + if ($lastexitcode -ne 0) + { + write-host "ERROR: msbuild.exe WindowsAppRuntime_DLL FAILED." + exit 1 + } + + write-host "Building WindowsAppRuntime_BootstrapDLL for Base: $configurationToRun|$platformToRun" + & $msBuildPath /restore ` + WindowsAppRuntime.sln ` + /t:WindowsAppRuntime_BootstrapDLL ` + /p:Configuration=$configurationToRun ` + /p:Platform=$platformToRun ` + /p:RestoreConfigFile=NuGet.config ` + /binaryLogger:"BuildOutput/binlogs/WindowsAppRuntime_BootstrapDLL.$platformToRun.$configurationToRun.binlog" ` + $WindowsAppSDKVersionProperty ` + /p:WindowsAppSDKCleanIntermediateFiles=true ` + /p:AppxSymbolPackageEnabled=false ` + /p:WindowsAppSDKBuildPipeline=$WindowsAppSDKBuildPipeline + if ($lastexitcode -ne 0) + { + write-host "ERROR: msbuild.exe WindowsAppRuntime_BootstrapDLL FAILED." + exit 1 + } + } + } + + # Build Bootstrap.Net (AnyCPU) + & $msBuildPath /restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config + if ($lastexitcode -ne 0) + { + write-host "ERROR: msbuild.exe Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED." + exit 1 + } + } if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "StageBaseFiles")) { #------------------ @@ -552,16 +611,24 @@ Try { # Stage native props (delegates to parent props) Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.Native.props" -Destination "$BasePackagePath\build\native\Microsoft.WindowsAppSDK.Base.props" - # Stage Bootstrap binaries and auto-initializer source files per-platform + # Stage auto-initializer source files from their source locations (no build needed) + Copy-Item -path "dev\Common\WindowsAppRuntimeAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\Common\WindowsAppRuntimeAutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\Deployment\DeploymentManagerAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\Deployment\DeploymentManagerAutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\UndockedRegFreeWinRT\UndockedRegFreeWinRT-AutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\UndockedRegFreeWinRT\UndockedRegFreeWinRT-AutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cs" -destination "$BasePackagePath\include" -force + + # Stage Bootstrap binaries per-platform (from build output) foreach($configurationToRun in $configuration.Split(",")) { foreach($platformToRun in $platform.Split(",")) { - $buildOutputDir = "BuildOutput\$configurationToRun\$platformToRun" - $bootstrapOutput = "$buildOutputDir\WindowsAppRuntime_BootstrapDLL" - $autoInitOutput = "$buildOutputDir\WindowsAppRuntime_DLL" + $bootstrapOutput = "BuildOutput\$configurationToRun\$platformToRun\WindowsAppRuntime_BootstrapDLL" - # Bootstrap binaries if(-not (test-path "$BasePackagePath\runtimes\win-$platformToRun\native")) { new-item -path "$BasePackagePath\runtimes\win-$platformToRun\native" -itemtype "directory" -force @@ -573,21 +640,6 @@ Try { Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.dll" -destination "$BasePackagePath\runtimes\win-$platformToRun\native" -force -ErrorAction SilentlyContinue Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.pdb" -destination "$BasePackagePath\runtimes\win-$platformToRun\native" -force -ErrorAction SilentlyContinue Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.lib" -destination "$BasePackagePath\lib\win10-$platformToRun" -force -ErrorAction SilentlyContinue - - # MddBootstrap.h header - Copy-Item -path "$bootstrapOutput\MddBootstrap.h" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - - # Auto-initializer source files - Copy-Item -path "$autoInitOutput\WindowsAppRuntimeAutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - Copy-Item -path "$autoInitOutput\WindowsAppRuntimeAutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - Copy-Item -path "$autoInitOutput\DeploymentManagerAutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - Copy-Item -path "$autoInitOutput\DeploymentManagerAutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - Copy-Item -path "$autoInitOutput\UndockedRegFreeWinRT-AutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - Copy-Item -path "$autoInitOutput\UndockedRegFreeWinRT-AutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - - # Bootstrap auto-initializer source files - Copy-Item -path "$bootstrapOutput\MddBootstrapAutoInitializer.cpp" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue - Copy-Item -path "$bootstrapOutput\MddBootstrapAutoInitializer.cs" -destination "$BasePackagePath\include" -force -ErrorAction SilentlyContinue } } diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml index 723a7652a2..01f9dc8ec5 100644 --- a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -221,6 +221,13 @@ stages: compilerPackageVersion: $(localCompilerOverridePackageVersion) slnDirectory: $(Build.SourcesDirectory) + - task: PowerShell@2 + name: BuildBaseFoundation + displayName: 'Build Foundation projects for Base package' + inputs: + filePath: 'BuildAll.ps1' + arguments: -AzureBuildStep BuildBaseFoundation -Platform "x86,x64,arm64" -Configuration Release + - task: PowerShell@2 name: StageBaseFiles displayName: 'Stage Base Package Files' From 5a7a72bccfd36c2fe87a0ece65a3af5cc480f8c3 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 12 Mar 2026 17:57:11 -0400 Subject: [PATCH 06/41] Fix BuildBaseFoundation: skip NugetRestore for SDK-style Bootstrap.Net The NugetRestore function sets NUGET_RESTORE_MSBUILD_ARGS with the multi-platform Platform variable which causes MSBuild to fail when invoked on a .csproj. SDK-style projects use /restore inline instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index a1c30aafee..3d2df112e6 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -500,7 +500,7 @@ Try { # WindowsAppRuntime_DLL (for .lib) and WindowsAppRuntime_BootstrapDLL (for Bootstrap.dll) #------------------ NugetRestore "WindowsAppRuntime" "WindowsAppRuntime.sln" - NugetRestore "Microsoft.WindowsAppRuntime.Bootstrap.Net" "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" + # Bootstrap.Net is SDK-style; /restore in the msbuild invocation handles it foreach($configurationToRun in $configuration.Split(",")) { From ddae02958aae6af76fd85621957fad6e09fae629 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 09:46:21 -0400 Subject: [PATCH 07/41] Fix BuildBaseFoundation: build vcxproj directly, fix NuGet restore - Build WindowsAppRuntime_DLL.vcxproj and BootstrapDLL.vcxproj directly instead of using /t:ProjectName on the solution (MSB4057 error) - Clear NUGET_RESTORE_MSBUILD_ARGS before solution restore to avoid multi-platform argument issues (MSB1006 error) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 3d2df112e6..033db5cf1e 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -499,8 +499,18 @@ Try { # Build the minimal Foundation projects needed for the Base package: # WindowsAppRuntime_DLL (for .lib) and WindowsAppRuntime_BootstrapDLL (for Bootstrap.dll) #------------------ - NugetRestore "WindowsAppRuntime" "WindowsAppRuntime.sln" - # Bootstrap.Net is SDK-style; /restore in the msbuild invocation handles it + + # Restore NuGet packages for the solution (packages.config projects) + # Clear NUGET_RESTORE_MSBUILD_ARGS to avoid multi-platform arg issues + $savedMsBuildArgs = $env:NUGET_RESTORE_MSBUILD_ARGS + $env:NUGET_RESTORE_MSBUILD_ARGS = "" + nuget restore WindowsAppRuntime.sln -configfile NuGet.config + if ($lastexitcode -ne 0) + { + write-host "ERROR: nuget.exe restore WindowsAppRuntime.sln FAILED." + exit 1 + } + $env:NUGET_RESTORE_MSBUILD_ARGS = $savedMsBuildArgs foreach($configurationToRun in $configuration.Split(",")) { @@ -508,8 +518,7 @@ Try { { write-host "Building WindowsAppRuntime_DLL for Base: $configurationToRun|$platformToRun" & $msBuildPath /restore ` - WindowsAppRuntime.sln ` - /t:WindowsAppRuntime_DLL ` + "dev\WindowsAppRuntime_DLL\WindowsAppRuntime_DLL.vcxproj" ` /p:Configuration=$configurationToRun ` /p:Platform=$platformToRun ` /p:RestoreConfigFile=NuGet.config ` @@ -526,8 +535,7 @@ Try { write-host "Building WindowsAppRuntime_BootstrapDLL for Base: $configurationToRun|$platformToRun" & $msBuildPath /restore ` - WindowsAppRuntime.sln ` - /t:WindowsAppRuntime_BootstrapDLL ` + "dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj" ` /p:Configuration=$configurationToRun ` /p:Platform=$platformToRun ` /p:RestoreConfigFile=NuGet.config ` From d95b731720f7a3bc0682ace10154f91cafab8f62 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 11:03:12 -0400 Subject: [PATCH 08/41] Decouple Bootstrap DLL from Foundation: use dynamic linkage Switch all 4 Foundation DLL imports (MddTryCreatePackageDependency, MddAddPackageDependency, MddRemovePackageDependency, WindowsAppRuntime_VersionInfo_TestInitialize) and MsixInstallLicenses to explicit dynamic linkage via GetProcAddress with runtime error reporting. Remove from BootstrapDLL vcxproj: - Microsoft.WindowsAppRuntime.lib from AdditionalDependencies - WindowsAppRuntime_DLL from AdditionalLibraryDirectories - Microsoft.WindowsAppRuntime.dll from DelayLoadDLLs Add source include paths for headers previously found via DLL output: - dev\WindowsAppRuntime_Insights (WindowsAppRuntimeInsights.h) - dev\DynamicDependency\API (MsixDynamicDependency.h, MddWin11.h) - dev\Licensing (MsixLicensing.h) Remove WindowsAppRuntime_DLL build from BuildBaseFoundation step since Bootstrap no longer needs the import library. All 18 local tests pass. dumpbin confirms zero import dependency on Microsoft.WindowsAppRuntime.dll across all 3 platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 21 +---- .../MddBootstrap.cpp | 82 +++++++++++++++++-- .../WindowsAppRuntime-Licensing.cpp | 12 ++- .../WindowsAppRuntime_BootstrapDLL.vcxproj | 36 +++----- 4 files changed, 102 insertions(+), 49 deletions(-) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 033db5cf1e..ac94a3f82e 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -496,8 +496,8 @@ Try { if ($AzureBuildStep -eq "BuildBaseFoundation") { #------------------ - # Build the minimal Foundation projects needed for the Base package: - # WindowsAppRuntime_DLL (for .lib) and WindowsAppRuntime_BootstrapDLL (for Bootstrap.dll) + # Build the Bootstrap DLL and Bootstrap.Net for the Base package. + # Bootstrap no longer links Microsoft.WindowsAppRuntime.lib; no Foundation DLL build needed. #------------------ # Restore NuGet packages for the solution (packages.config projects) @@ -516,23 +516,6 @@ Try { { foreach($platformToRun in $platform.Split(",")) { - write-host "Building WindowsAppRuntime_DLL for Base: $configurationToRun|$platformToRun" - & $msBuildPath /restore ` - "dev\WindowsAppRuntime_DLL\WindowsAppRuntime_DLL.vcxproj" ` - /p:Configuration=$configurationToRun ` - /p:Platform=$platformToRun ` - /p:RestoreConfigFile=NuGet.config ` - /binaryLogger:"BuildOutput/binlogs/WindowsAppRuntime_DLL.$platformToRun.$configurationToRun.binlog" ` - $WindowsAppSDKVersionProperty ` - /p:WindowsAppSDKCleanIntermediateFiles=true ` - /p:AppxSymbolPackageEnabled=false ` - /p:WindowsAppSDKBuildPipeline=$WindowsAppSDKBuildPipeline - if ($lastexitcode -ne 0) - { - write-host "ERROR: msbuild.exe WindowsAppRuntime_DLL FAILED." - exit 1 - } - write-host "Building WindowsAppRuntime_BootstrapDLL for Base: $configurationToRun|$platformToRun" & $msBuildPath /restore ` "dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj" ` diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp b/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp index d9e186cdd3..a40cd23c8b 100644 --- a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp +++ b/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp @@ -14,6 +14,31 @@ #include +// Function pointer types for dynamically-loaded Microsoft.WindowsAppRuntime.dll APIs +using PFN_MddTryCreatePackageDependency = HRESULT(STDAPICALLTYPE*)( + PSID user, + _In_ PCWSTR packageFamilyName, + PACKAGE_VERSION minVersion, + MddPackageDependencyProcessorArchitectures packageDependencyProcessorArchitectures, + MddPackageDependencyLifetimeKind lifetimeKind, + PCWSTR lifetimeArtifact, + MddCreatePackageDependencyOptions options, + _Outptr_result_maybenull_ PWSTR* packageDependencyId); + +using PFN_MddAddPackageDependency = HRESULT(STDAPICALLTYPE*)( + _In_ PCWSTR packageDependencyId, + INT32 rank, + MddAddPackageDependencyOptions options, + _Out_ MDD_PACKAGEDEPENDENCY_CONTEXT* packageDependencyContext, + _Outptr_opt_result_maybenull_ PWSTR* packageFullName); + +using PFN_MddRemovePackageDependency = void(STDAPICALLTYPE*)( + _In_ MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext); + +using PFN_WindowsAppRuntime_VersionInfo_TestInitialize = HRESULT(STDAPICALLTYPE*)( + PCWSTR frameworkPackageFamilyName, + PCWSTR mainPackageFamilyName); + HRESULT _MddBootstrapInitialize( UINT32 majorMinorVersion, PCWSTR versionTag, @@ -87,6 +112,10 @@ static UsingWin11Support g_usingWin11Support{ UsingWin11Support::Unknown }; static IDynamicDependencyLifetimeManager* g_lifetimeManager{}; static wil::unique_event g_endTheLifetimeManagerEvent; static wil::unique_hmodule g_windowsAppRuntimeDll; +static PFN_MddTryCreatePackageDependency g_pfnMddTryCreatePackageDependency{}; +static PFN_MddAddPackageDependency g_pfnMddAddPackageDependency{}; +static PFN_MddRemovePackageDependency g_pfnMddRemovePackageDependency{}; +static PFN_WindowsAppRuntime_VersionInfo_TestInitialize g_pfnVersionInfoTestInitialize{}; static wil::unique_process_heap_string g_packageDependencyId; static MDD_PACKAGEDEPENDENCY_CONTEXT g_packageDependencyContext{}; @@ -245,12 +274,19 @@ STDAPI_(void) MddBootstrapShutdown() noexcept // Last one out turn out the lights... if (g_packageDependencyContext) { - MddRemovePackageDependency(g_packageDependencyContext); + if (g_pfnMddRemovePackageDependency) + { + g_pfnMddRemovePackageDependency(g_packageDependencyContext); + } g_packageDependencyContext = nullptr; } g_packageDependencyId.reset(); + g_pfnMddTryCreatePackageDependency = nullptr; + g_pfnMddAddPackageDependency = nullptr; + g_pfnMddRemovePackageDependency = nullptr; + g_pfnVersionInfoTestInitialize = nullptr; g_windowsAppRuntimeDll.reset(); if (g_endTheLifetimeManagerEvent) @@ -401,7 +437,19 @@ void FirstTimeInitialization( FAIL_FAST_HR_IF(E_UNEXPECTED, g_test_ddlmPackagePublisherId.empty()); FAIL_FAST_HR_IF(E_UNEXPECTED, g_test_mainPackageNamePrefix.empty()); - ::WindowsAppRuntime::VersionInfo::TestInitialize(frameworkPackageFamilyName.c_str()); + // Dynamically load the DLL to call VersionInfo_TestInitialize (test-only path) + auto windowsAppRuntimeDll = wil::unique_hmodule(LoadLibraryExW(L"Microsoft.WindowsAppRuntime.dll", nullptr, 0)); + if (windowsAppRuntimeDll) + { + auto pfnTestInit = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "WindowsAppRuntime_VersionInfo_TestInitialize")); + if (pfnTestInit) + { + FAIL_FAST_IF_FAILED(pfnTestInit(frameworkPackageFamilyName.c_str(), nullptr)); + } + g_windowsAppRuntimeDll = std::move(windowsAppRuntimeDll); + g_pfnVersionInfoTestInitialize = pfnTestInit; + } } // Track our initialized state @@ -437,16 +485,33 @@ void FirstTimeInitialization( THROW_WIN32_MSG(lastError, "Error in LoadLibrary: %d (0x%X) loading %ls", lastError, lastError, windowsAppRuntimeDllFilename.c_str()); } + // Resolve function pointers from the dynamically-loaded DLL + auto pfnTryCreate = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MddTryCreatePackageDependency")); + THROW_LAST_ERROR_IF_NULL_MSG(pfnTryCreate, "Failed to resolve MddTryCreatePackageDependency from %ls", windowsAppRuntimeDllFilename.c_str()); + + auto pfnAdd = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MddAddPackageDependency")); + THROW_LAST_ERROR_IF_NULL_MSG(pfnAdd, "Failed to resolve MddAddPackageDependency from %ls", windowsAppRuntimeDllFilename.c_str()); + + auto pfnRemove = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MddRemovePackageDependency")); + THROW_LAST_ERROR_IF_NULL_MSG(pfnRemove, "Failed to resolve MddRemovePackageDependency from %ls", windowsAppRuntimeDllFilename.c_str()); + + // VersionInfo_TestInitialize is test-only; resolve but don't fail if missing + auto pfnTestInit = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "WindowsAppRuntime_VersionInfo_TestInitialize")); + // Add the framework package to the package graph const MddPackageDependencyProcessorArchitectures architectureFilter{}; const auto lifetimeKind{ MddPackageDependencyLifetimeKind::Process }; const MddCreatePackageDependencyOptions createOptions{}; wil::unique_process_heap_string packageDependencyId; - THROW_IF_FAILED(MddTryCreatePackageDependency(nullptr, frameworkPackageInfo->packageFamilyName, minVersion, architectureFilter, lifetimeKind, nullptr, createOptions, &packageDependencyId)); + THROW_IF_FAILED(pfnTryCreate(nullptr, frameworkPackageInfo->packageFamilyName, minVersion, architectureFilter, lifetimeKind, nullptr, createOptions, &packageDependencyId)); // const MddAddPackageDependencyOptions addOptions{}; MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext{}; - THROW_IF_FAILED(MddAddPackageDependency(packageDependencyId.get(), MDD_PACKAGE_DEPENDENCY_RANK_DEFAULT, addOptions, &packageDependencyContext, nullptr)); + THROW_IF_FAILED(pfnAdd(packageDependencyId.get(), MDD_PACKAGE_DEPENDENCY_RANK_DEFAULT, addOptions, &packageDependencyContext, nullptr)); // Remove our temporary path addition RemoveFrameworkFromPath(frameworkPackageInfo->path); @@ -475,7 +540,10 @@ void FirstTimeInitialization( packagVersionTagDelimiter, packageVersionTag) }; FAIL_FAST_HR_IF_MSG(E_UNEXPECTED, mainPackageFamilyName.length() > PACKAGE_FAMILY_NAME_MAX_LENGTH, "%ls", mainPackageFamilyName.c_str()); - ::WindowsAppRuntime::VersionInfo::TestInitialize(frameworkPackageFamilyName.c_str(), mainPackageFamilyName.c_str()); + if (pfnTestInit) + { + FAIL_FAST_IF_FAILED(pfnTestInit(frameworkPackageFamilyName.c_str(), mainPackageFamilyName.c_str())); + } } // Track our initialized state @@ -484,6 +552,10 @@ void FirstTimeInitialization( g_lifetimeManager = lifetimeManager.detach(); g_endTheLifetimeManagerEvent = std::move(endTheLifetimeManagerEvent); g_windowsAppRuntimeDll = std::move(windowsAppRuntimeDll); + g_pfnMddTryCreatePackageDependency = pfnTryCreate; + g_pfnMddAddPackageDependency = pfnAdd; + g_pfnMddRemovePackageDependency = pfnRemove; + g_pfnVersionInfoTestInitialize = pfnTestInit; g_packageDependencyId = std::move(packageDependencyId); g_packageDependencyContext = packageDependencyContext; // diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp b/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp index aa1af6fcb2..cb2086f08f 100644 --- a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp +++ b/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp @@ -6,9 +6,19 @@ #include +using PFN_MsixInstallLicenses = HRESULT(STDAPICALLTYPE*)(); + STDAPI WindowsAppRuntime_InstallLicenses() noexcept try { - RETURN_IF_FAILED(MsixInstallLicenses()); + // Dynamically load the Foundation DLL to call MsixInstallLicenses + auto windowsAppRuntimeDll = wil::unique_hmodule(LoadLibraryExW(L"Microsoft.WindowsAppRuntime.dll", nullptr, 0)); + RETURN_LAST_ERROR_IF_NULL_MSG(windowsAppRuntimeDll, "Failed to load Microsoft.WindowsAppRuntime.dll for licensing"); + + auto pfnInstall = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MsixInstallLicenses")); + RETURN_LAST_ERROR_IF_NULL_MSG(pfnInstall, "Failed to resolve MsixInstallLicenses"); + + RETURN_IF_FAILED(pfnInstall()); return S_OK; } CATCH_RETURN(); diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj b/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj index 2e468ebae2..11ef39a00b 100644 --- a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj +++ b/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj @@ -123,17 +123,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing WIN32;_DEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -146,17 +144,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing _DEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -169,17 +165,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing _DEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -192,17 +186,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing WIN32;NDEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -215,17 +207,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing NDEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -238,17 +228,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing NDEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None From 059c388ee43a77b7cb5df88d95abac706715ff63 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 11:13:33 -0400 Subject: [PATCH 09/41] Rename BuildBaseFoundation to BuildBase - no Foundation dependency Now that Bootstrap DLL uses dynamic linkage, the Base pipeline build step no longer builds any Foundation projects. Rename to reflect this. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 4 ++-- .../WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index ac94a3f82e..10be182961 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -493,11 +493,11 @@ Try { Copy-Item -Path $IntellisenseFile -Destination $DestinationDir } } - if ($AzureBuildStep -eq "BuildBaseFoundation") + if ($AzureBuildStep -eq "BuildBase") { #------------------ # Build the Bootstrap DLL and Bootstrap.Net for the Base package. - # Bootstrap no longer links Microsoft.WindowsAppRuntime.lib; no Foundation DLL build needed. + # No Foundation build dependency required. #------------------ # Restore NuGet packages for the solution (packages.config projects) diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml index 01f9dc8ec5..820d0104a5 100644 --- a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -222,11 +222,11 @@ stages: slnDirectory: $(Build.SourcesDirectory) - task: PowerShell@2 - name: BuildBaseFoundation - displayName: 'Build Foundation projects for Base package' + name: BuildBase + displayName: 'Build Bootstrap DLL and Bootstrap.Net' inputs: filePath: 'BuildAll.ps1' - arguments: -AzureBuildStep BuildBaseFoundation -Platform "x86,x64,arm64" -Configuration Release + arguments: -AzureBuildStep BuildBase -Platform "x86,x64,arm64" -Configuration Release - task: PowerShell@2 name: StageBaseFiles From 01375adb72c53ef0c88a9c74721334d5c33bf9e0 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 11:27:48 -0400 Subject: [PATCH 10/41] Move all Base content under base\ folder Move WindowsAppRuntime_BootstrapDLL, Bootstrap.Net, and all auto-initializer source files under base\dev\ so that pipeline folder triggers (base\**) cleanly separate Base from Foundation. - base\dev\WindowsAppRuntime_BootstrapDLL\ (from dev\) - base\dev\Bootstrap\CS\ (from dev\Bootstrap\CS\) - base\dev\include\ (auto-initializers from dev\Common, Deployment, UndockedRegFreeWinRT) Updated 84 files: solution, vcxproj, csproj, vcxitems, BuildAll.ps1, pipeline templates, test targets, test projects. All 18 local tests pass. All 3 platform builds verified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 26 +++++++++---------- WindowsAppRuntime.sln | 4 +-- .../Bootstrap.cs | 0 ...oft.WindowsAppRuntime.Bootstrap.Net.csproj | 0 .../MddBootstrap.cpp | 0 .../MddBootstrap.h | 0 .../MddBootstrapActivity.cpp | 0 .../MddBootstrapActivity.h | 0 .../MddBootstrapAutoInitializer.cpp | 0 .../MddBootstrapAutoInitializer.cs | 0 .../MddBootstrapTest.h | 0 .../MddBootstrapTracelogging.cpp | 0 .../MddBootstrapTracelogging.h | 0 .../WindowsAppRuntime-Licensing.cpp | 0 .../WindowsAppRuntime-Licensing.h | 0 .../WindowsAppRuntime.Bootstrap.def | 0 .../WindowsAppRuntime.Bootstrap.rc | 0 .../WindowsAppRuntime_BootstrapDLL.vcxproj | 2 +- ...owsAppRuntime_BootstrapDLL.vcxproj.filters | 0 .../dllmain.cpp | 0 .../framework.h | 0 .../packages.config | 0 .../WindowsAppRuntime_BootstrapDLL/pch.cpp | 0 .../dev}/WindowsAppRuntime_BootstrapDLL/pch.h | 0 .../wil_msixdynamicdependency.h | 0 .../DeploymentManagerAutoInitializer.cpp | 0 .../DeploymentManagerAutoInitializer.cs | 0 .../UndockedRegFreeWinRT-AutoInitializer.cpp | 0 .../UndockedRegFreeWinRT-AutoInitializer.cs | 0 .../WindowsAppRuntimeAutoInitializer.cpp | 0 .../WindowsAppRuntimeAutoInitializer.cs | 0 ...owsAppSDK-BuildFoundation-AnyCPU-Steps.yml | 2 +- dev/Common/Common.vcxitems | 6 ++--- dev/Deployment/Deployment.vcxitems | 6 ++--- .../UndockedRegFreeWinRT.vcxitems | 6 ++--- test/ABForward/ABForward.vcxproj | 2 +- .../AccessControlTests.vcxproj | 2 +- test/AppLifecycle/AppLifecycle.vcxproj | 2 +- .../AppNotificationBuilderTests.vcxproj | 2 +- .../AppNotificationTests.vcxproj | 2 +- .../ApplicationDataTests.vcxproj | 4 +-- .../BackgroundTaskTests.vcxproj | 14 +++++----- .../BadgeNotificationTest.vcxproj | 2 +- .../CameraCaptureUITests.vcxproj | 14 +++++----- test/Common/Common.vcxproj | 2 +- .../CompatibilityTests.vcxproj | 2 +- .../Test_CompatibilitySetter_CPP.vcxproj | 2 +- test/Decimal/CPP/DecimalTests.vcxproj | 4 +-- test/Decimal/WinRT/DecimalTest_WinRT.vcxproj | 4 +-- ...tManagerAutoInitialize_CPP_Default.vcxproj | 2 +- ...AutoInitialize_CPP_Options_Default.vcxproj | 2 +- ...AutoInitialize_CPP_Options_Defined.vcxproj | 2 +- ...gerAutoInitialize_CPP_Options_None.vcxproj | 2 +- ...erAutoInitialize_CS_Options_Defined.csproj | 2 +- .../HelloWorldAdvancedCS.csproj | 2 +- .../HelloWorldAdvancedCS_NoThrow.csproj | 2 +- ...ootstrapAutoInitialize_CPP_Default.vcxproj | 4 +-- ...AutoInitialize_CPP_Options_Default.vcxproj | 4 +-- ...AutoInitialize_CPP_Options_Defined.vcxproj | 4 +-- ...rapAutoInitialize_CPP_Options_None.vcxproj | 4 +-- ..._BootstrapAutoInitialize_CS_Default.csproj | 4 +-- ...apAutoInitialize_CS_Options_Default.csproj | 4 +-- ...apAutoInitialize_CS_Options_Defined.csproj | 4 +-- ...strapAutoInitialize_CS_Options_None.csproj | 4 +-- .../DynamicDependency_Test_Win32.vcxproj | 2 +- .../DynamicDependency_Test_WinRT.vcxproj | 2 +- .../EnvironmentManagerTests.vcxproj | 2 +- test/LRPTests/LRPTests.vcxproj | 2 +- .../OAuth2ManagerTests.vcxproj | 14 +++++----- .../API/PackageManagerTests.vcxproj | 4 +-- .../PowerNotifications.vcxproj | 10 +++---- .../PushNotificationTests.vcxproj | 2 +- .../StoragePickersTests.vcxproj | 2 +- .../AccessControlTestApp.vcxproj | 2 +- .../ManualTestApp/ManualTestApp.vcxproj | 2 +- .../OAuthTestApp/OAuthTestApp.vcxproj | 2 +- .../PushNotificationsDemoApp.vcxproj | 2 +- .../PushNotificationsTestApp.vcxproj | 2 +- .../ToastNotificationsDemoApp.vcxproj | 2 +- .../ToastNotificationsTestApp.vcxproj | 2 +- test/VersionInfo/VersionInfoTests.vcxproj | 2 +- test/test.autoinitializer.CS.targets | 2 +- test/test.autoinitializer.Native.targets | 2 +- .../PurojekutoTenpuret.vcxproj | 2 +- 84 files changed, 109 insertions(+), 109 deletions(-) rename {dev => base/dev}/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs (100%) rename {dev => base/dev}/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj (99%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/dllmain.cpp (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/framework.h (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/packages.config (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/pch.cpp (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/pch.h (100%) rename {dev => base/dev}/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h (100%) rename {dev/Deployment => base/dev/include}/DeploymentManagerAutoInitializer.cpp (100%) rename {dev/Deployment => base/dev/include}/DeploymentManagerAutoInitializer.cs (100%) rename {dev/UndockedRegFreeWinRT => base/dev/include}/UndockedRegFreeWinRT-AutoInitializer.cpp (100%) rename {dev/UndockedRegFreeWinRT => base/dev/include}/UndockedRegFreeWinRT-AutoInitializer.cs (100%) rename {dev/Common => base/dev/include}/WindowsAppRuntimeAutoInitializer.cpp (100%) rename {dev/Common => base/dev/include}/WindowsAppRuntimeAutoInitializer.cs (100%) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 10be182961..3b8af7f03e 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -140,7 +140,7 @@ Try { if (($AzureBuildStep -eq "all") -Or (($AzureBuildStep -eq "BuildFoundation") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup"))) { NugetRestore "WindowsAppRuntime" "WindowsAppRuntime.sln" - NugetRestore "Microsoft.WindowsAppRuntime.Bootstrap.Net" "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" + NugetRestore "Microsoft.WindowsAppRuntime.Bootstrap.Net" "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" $srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse @@ -243,7 +243,7 @@ Try { # Build windowsAppRuntime.sln (anyCPU) and move output to staging. #------------------ # build and restore AnyCPU - & $msBuildPath /restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config + & $msBuildPath /restore "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config if ($lastexitcode -ne 0) { write-host "ERROR: msbuild.exe Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED." @@ -518,7 +518,7 @@ Try { { write-host "Building WindowsAppRuntime_BootstrapDLL for Base: $configurationToRun|$platformToRun" & $msBuildPath /restore ` - "dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj" ` + "base\dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj" ` /p:Configuration=$configurationToRun ` /p:Platform=$platformToRun ` /p:RestoreConfigFile=NuGet.config ` @@ -536,7 +536,7 @@ Try { } # Build Bootstrap.Net (AnyCPU) - & $msBuildPath /restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config + & $msBuildPath /restore "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config if ($lastexitcode -ne 0) { write-host "ERROR: msbuild.exe Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED." @@ -603,15 +603,15 @@ Try { Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.Native.props" -Destination "$BasePackagePath\build\native\Microsoft.WindowsAppSDK.Base.props" # Stage auto-initializer source files from their source locations (no build needed) - Copy-Item -path "dev\Common\WindowsAppRuntimeAutoInitializer.cpp" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\Common\WindowsAppRuntimeAutoInitializer.cs" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\Deployment\DeploymentManagerAutoInitializer.cpp" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\Deployment\DeploymentManagerAutoInitializer.cs" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\UndockedRegFreeWinRT\UndockedRegFreeWinRT-AutoInitializer.cpp" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\UndockedRegFreeWinRT\UndockedRegFreeWinRT-AutoInitializer.cs" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp" -destination "$BasePackagePath\include" -force - Copy-Item -path "dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\WindowsAppRuntimeAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\WindowsAppRuntimeAutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\DeploymentManagerAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\DeploymentManagerAutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\UndockedRegFreeWinRT-AutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\UndockedRegFreeWinRT-AutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cs" -destination "$BasePackagePath\include" -force # Stage Bootstrap binaries per-platform (from build output) foreach($configurationToRun in $configuration.Split(",")) diff --git a/WindowsAppRuntime.sln b/WindowsAppRuntime.sln index d36b1388a6..dab2999f19 100644 --- a/WindowsAppRuntime.sln +++ b/WindowsAppRuntime.sln @@ -52,7 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DynamicDependency_Test_Win3 {F76B776E-86F5-48C5-8FC7-D2795ECC9746} = {F76B776E-86F5-48C5-8FC7-D2795ECC9746} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsAppRuntime_BootstrapDLL", "dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj", "{F76B776E-86F5-48C5-8FC7-D2795ECC9746}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsAppRuntime_BootstrapDLL", "base\dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj", "{F76B776E-86F5-48C5-8FC7-D2795ECC9746}" ProjectSection(ProjectDependencies) = postProject {B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1} EndProjectSection @@ -233,7 +233,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bootstrap", "Bootstrap", "{ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CS", "CS", "{536FA8DA-51E2-40A3-8A97-A90FFA75AA18}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.WindowsAppRuntime.Bootstrap.Net", "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj", "{D6574FD6-8D13-4412-9FCB-308D44063CDA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.WindowsAppRuntime.Bootstrap.Net", "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj", "{D6574FD6-8D13-4412-9FCB-308D44063CDA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.System.Power.Projection", "dev\Projections\CS\Microsoft.Windows.System.Power\Microsoft.Windows.System.Power.Projection.csproj", "{63ACBA4F-385A-4D04-98AD-263FED501A19}" ProjectSection(ProjectDependencies) = postProject diff --git a/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs b/base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs similarity index 100% rename from dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs rename to base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs diff --git a/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj b/base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj similarity index 100% rename from dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj rename to base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj similarity index 99% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj index 11ef39a00b..4ad92ba684 100644 --- a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj +++ b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj @@ -312,7 +312,7 @@ - + {ccd23028-b9d3-410b-836e-20b2e7c08451} diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters diff --git a/dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/framework.h b/base/dev/WindowsAppRuntime_BootstrapDLL/framework.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/framework.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/framework.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/packages.config b/base/dev/WindowsAppRuntime_BootstrapDLL/packages.config similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/packages.config rename to base/dev/WindowsAppRuntime_BootstrapDLL/packages.config diff --git a/dev/WindowsAppRuntime_BootstrapDLL/pch.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/pch.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/pch.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/pch.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/pch.h b/base/dev/WindowsAppRuntime_BootstrapDLL/pch.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/pch.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/pch.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h b/base/dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h diff --git a/dev/Deployment/DeploymentManagerAutoInitializer.cpp b/base/dev/include/DeploymentManagerAutoInitializer.cpp similarity index 100% rename from dev/Deployment/DeploymentManagerAutoInitializer.cpp rename to base/dev/include/DeploymentManagerAutoInitializer.cpp diff --git a/dev/Deployment/DeploymentManagerAutoInitializer.cs b/base/dev/include/DeploymentManagerAutoInitializer.cs similarity index 100% rename from dev/Deployment/DeploymentManagerAutoInitializer.cs rename to base/dev/include/DeploymentManagerAutoInitializer.cs diff --git a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cpp b/base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cpp similarity index 100% rename from dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cpp rename to base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cpp diff --git a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs b/base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cs similarity index 100% rename from dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs rename to base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cs diff --git a/dev/Common/WindowsAppRuntimeAutoInitializer.cpp b/base/dev/include/WindowsAppRuntimeAutoInitializer.cpp similarity index 100% rename from dev/Common/WindowsAppRuntimeAutoInitializer.cpp rename to base/dev/include/WindowsAppRuntimeAutoInitializer.cpp diff --git a/dev/Common/WindowsAppRuntimeAutoInitializer.cs b/base/dev/include/WindowsAppRuntimeAutoInitializer.cs similarity index 100% rename from dev/Common/WindowsAppRuntimeAutoInitializer.cs rename to base/dev/include/WindowsAppRuntimeAutoInitializer.cs diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml index d9661bd2f2..1e4746447b 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml @@ -35,7 +35,7 @@ steps: displayName: Run PREfast SDL Native Rules inputs: setupCommandlines: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"' - msBuildCommandline: 'msbuild.exe /restore /nologo /nr:false $(Build.SourcesDirectory)\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj' + msBuildCommandline: 'msbuild.exe /restore /nologo /nr:false $(Build.SourcesDirectory)\base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj' # Generally speaking, we leave it to the external repos to scan the bits in their packages. excludedPaths: | $(Build.SourcesDirectory)\packages diff --git a/dev/Common/Common.vcxitems b/dev/Common/Common.vcxitems index 6d880a9ddd..9db5300e07 100644 --- a/dev/Common/Common.vcxitems +++ b/dev/Common/Common.vcxitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -34,8 +34,8 @@ - - + + diff --git a/dev/Deployment/Deployment.vcxitems b/dev/Deployment/Deployment.vcxitems index 9636a5884f..12fec791ee 100644 --- a/dev/Deployment/Deployment.vcxitems +++ b/dev/Deployment/Deployment.vcxitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -36,8 +36,8 @@ - - + + diff --git a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems b/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems index 33748203ce..9e6e508fba 100644 --- a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems +++ b/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -24,7 +24,7 @@ - - + + diff --git a/test/ABForward/ABForward.vcxproj b/test/ABForward/ABForward.vcxproj index a8c7dfaa4c..8c75994199 100644 --- a/test/ABForward/ABForward.vcxproj +++ b/test/ABForward/ABForward.vcxproj @@ -301,7 +301,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AccessControlTests/AccessControlTests.vcxproj b/test/AccessControlTests/AccessControlTests.vcxproj index 36aa8bb2ba..5fe80eb021 100644 --- a/test/AccessControlTests/AccessControlTests.vcxproj +++ b/test/AccessControlTests/AccessControlTests.vcxproj @@ -215,7 +215,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AppLifecycle/AppLifecycle.vcxproj b/test/AppLifecycle/AppLifecycle.vcxproj index 3e3cb5d208..e1f3a4f8b6 100644 --- a/test/AppLifecycle/AppLifecycle.vcxproj +++ b/test/AppLifecycle/AppLifecycle.vcxproj @@ -219,7 +219,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj index fe18fcbdec..bf3750c665 100644 --- a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj +++ b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj @@ -130,7 +130,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AppNotificationTests/AppNotificationTests.vcxproj b/test/AppNotificationTests/AppNotificationTests.vcxproj index a586593b02..7b4be7d2e3 100644 --- a/test/AppNotificationTests/AppNotificationTests.vcxproj +++ b/test/AppNotificationTests/AppNotificationTests.vcxproj @@ -140,7 +140,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/ApplicationData/ApplicationDataTests.vcxproj b/test/ApplicationData/ApplicationDataTests.vcxproj index e511f44ecd..ca8909bc64 100644 --- a/test/ApplicationData/ApplicationDataTests.vcxproj +++ b/test/ApplicationData/ApplicationDataTests.vcxproj @@ -1,4 +1,4 @@ - + @@ -135,7 +135,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj b/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj index 297b63d539..fd97fc7b95 100644 --- a/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj +++ b/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj @@ -122,7 +122,7 @@ Use Level3 true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common WIN32;_DEBUG;%(PreprocessorDefinitions) true pch.h @@ -137,7 +137,7 @@ Use Level3 true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common _DEBUG;%(PreprocessorDefinitions) true pch.h @@ -154,7 +154,7 @@ true true true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common WIN32;NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -173,7 +173,7 @@ true true true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -192,7 +192,7 @@ true true true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -206,7 +206,7 @@ - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common @@ -243,7 +243,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj b/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj index ad5094a8d0..3fc84bcf29 100644 --- a/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj +++ b/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj @@ -135,7 +135,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj b/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj index 2b19253c4f..f048264c40 100644 --- a/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj +++ b/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj @@ -107,7 +107,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -125,7 +125,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -143,7 +143,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -161,7 +161,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -179,7 +179,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -197,7 +197,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -234,7 +234,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Common/Common.vcxproj b/test/Common/Common.vcxproj index 9b5ea7ac03..e169bb1c3e 100644 --- a/test/Common/Common.vcxproj +++ b/test/Common/Common.vcxproj @@ -122,7 +122,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj b/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj index 8edeb3908c..dd76a808a3 100644 --- a/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj +++ b/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj @@ -123,7 +123,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj b/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj index ffa104d5fa..0a92dc1c24 100644 --- a/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj +++ b/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj @@ -135,7 +135,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Decimal/CPP/DecimalTests.vcxproj b/test/Decimal/CPP/DecimalTests.vcxproj index 984b2377f6..d14550f779 100644 --- a/test/Decimal/CPP/DecimalTests.vcxproj +++ b/test/Decimal/CPP/DecimalTests.vcxproj @@ -1,4 +1,4 @@ - + @@ -127,7 +127,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj b/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj index 1706444e50..c330a24d20 100644 --- a/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj +++ b/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj @@ -1,4 +1,4 @@ - + @@ -134,7 +134,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj index 4b42c2047d..19882d3227 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj @@ -117,7 +117,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj index e3d453339b..7c76ab3273 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj index bd4cd76a70..43bdcc7baa 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj index 4ead437416..9c51b14d6a 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj index 7cd30f6bbd..f647b67ad9 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj @@ -45,7 +45,7 @@ - + diff --git a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj index 1e56c39bdc..f92f435a24 100644 --- a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj +++ b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj @@ -25,7 +25,7 @@ - + diff --git a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj index 1e56c39bdc..f92f435a24 100644 --- a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj +++ b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj @@ -25,7 +25,7 @@ - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj index d6e38a1fc7..dda9b07b08 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj @@ -102,7 +102,7 @@ - + @@ -111,7 +111,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj index 00fff1528a..c0e394cc65 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj @@ -103,7 +103,7 @@ - + @@ -112,7 +112,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj index 5a34d17988..ea28af79c8 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj @@ -107,7 +107,7 @@ - + @@ -116,7 +116,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj index cef7c4d1b9..80846c62c0 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj @@ -103,7 +103,7 @@ - + @@ -112,7 +112,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj index b047757058..197f6d7272 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj index 13e52bf6e9..7132300bde 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj index 0e4a8f04b5..444876709b 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj index d115efc614..d8a7d21d32 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj b/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj index 9ef52159d2..bfa62ff882 100644 --- a/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj +++ b/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj @@ -229,7 +229,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj b/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj index 9007764baa..cc79c52e82 100644 --- a/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj +++ b/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj @@ -232,7 +232,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj b/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj index cafdaf0b01..3ebdc95716 100644 --- a/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj +++ b/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj @@ -164,7 +164,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/LRPTests/LRPTests.vcxproj b/test/LRPTests/LRPTests.vcxproj index 53b8c0e24d..6555fd02d6 100644 --- a/test/LRPTests/LRPTests.vcxproj +++ b/test/LRPTests/LRPTests.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj b/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj index d5bc13180a..6e5c3d6e43 100644 --- a/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj +++ b/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj @@ -107,7 +107,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -125,7 +125,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -148,7 +148,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -167,7 +167,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -185,7 +185,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -203,7 +203,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -255,7 +255,7 @@ {d6bc25c5-1aa7-4c4a-a02c-b42dedbfea33} - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/PackageManager/API/PackageManagerTests.vcxproj b/test/PackageManager/API/PackageManagerTests.vcxproj index 7137f9d59f..5239721c34 100644 --- a/test/PackageManager/API/PackageManagerTests.vcxproj +++ b/test/PackageManager/API/PackageManagerTests.vcxproj @@ -1,4 +1,4 @@ - + @@ -159,7 +159,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/PowerNotifications/PowerNotifications.vcxproj b/test/PowerNotifications/PowerNotifications.vcxproj index 4a6083f0a4..2e8a003a4b 100644 --- a/test/PowerNotifications/PowerNotifications.vcxproj +++ b/test/PowerNotifications/PowerNotifications.vcxproj @@ -74,7 +74,7 @@ WIN32;_DEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -86,7 +86,7 @@ WIN32;NDEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -98,7 +98,7 @@ _DEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -110,7 +110,7 @@ NDEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -141,7 +141,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/PushNotificationTests/PushNotificationTests.vcxproj b/test/PushNotificationTests/PushNotificationTests.vcxproj index 2745e217a4..cb3b3e5ce5 100644 --- a/test/PushNotificationTests/PushNotificationTests.vcxproj +++ b/test/PushNotificationTests/PushNotificationTests.vcxproj @@ -131,7 +131,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/StoragePickersTests/StoragePickersTests.vcxproj b/test/StoragePickersTests/StoragePickersTests.vcxproj index b161533861..84258a0ea8 100644 --- a/test/StoragePickersTests/StoragePickersTests.vcxproj +++ b/test/StoragePickersTests/StoragePickersTests.vcxproj @@ -129,7 +129,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj b/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj index 227342c347..7741c6b53e 100644 --- a/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj +++ b/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj @@ -48,7 +48,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/ManualTestApp/ManualTestApp.vcxproj b/test/TestApps/ManualTestApp/ManualTestApp.vcxproj index 46f27e5e58..06fda99c6a 100644 --- a/test/TestApps/ManualTestApp/ManualTestApp.vcxproj +++ b/test/TestApps/ManualTestApp/ManualTestApp.vcxproj @@ -207,7 +207,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj b/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj index 70e7e69b18..e48864f308 100644 --- a/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj +++ b/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj b/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj index c375ae9e8a..3889eede63 100644 --- a/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj +++ b/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj @@ -212,7 +212,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj b/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj index 666d1f1aef..5baefb6abe 100644 --- a/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj +++ b/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj @@ -53,7 +53,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj b/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj index 48c96d4a34..163b5617cd 100644 --- a/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj +++ b/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj @@ -218,7 +218,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj b/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj index 04e3858dbc..67ad50635b 100644 --- a/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj +++ b/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj @@ -54,7 +54,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/VersionInfo/VersionInfoTests.vcxproj b/test/VersionInfo/VersionInfoTests.vcxproj index 029e9305d3..197019db72 100644 --- a/test/VersionInfo/VersionInfoTests.vcxproj +++ b/test/VersionInfo/VersionInfoTests.vcxproj @@ -125,7 +125,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/test.autoinitializer.CS.targets b/test/test.autoinitializer.CS.targets index 017fada5ee..9103ec6cd7 100644 --- a/test/test.autoinitializer.CS.targets +++ b/test/test.autoinitializer.CS.targets @@ -14,7 +14,7 @@ - + diff --git a/test/test.autoinitializer.Native.targets b/test/test.autoinitializer.Native.targets index fd0b286896..9b6225eb60 100644 --- a/test/test.autoinitializer.Native.targets +++ b/test/test.autoinitializer.Native.targets @@ -6,7 +6,7 @@ - + NotUsing MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_BOOTSTRAP;%(PreprocessorDefinitions) MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_DEPLOYMENTMANAGER;%(PreprocessorDefinitions) diff --git a/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj b/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj index 3bca99ea39..bd936be11b 100644 --- a/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj +++ b/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj @@ -127,7 +127,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} From 71956e7f1b0dcf5ef2b80db56caac1c5a0c6ed40 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 12:47:59 -0400 Subject: [PATCH 11/41] Add DeploymentManager requires Foundation validation Config 8 (RS5_FD_Pkg): set WindowsAppSdkDeploymentManagerInitialize=true and expect MSBuild error when Foundation is not referenced. Added WindowsAppSDKDeploymentManagerRequiresFoundation validation target in BaseCommon.targets, matching the existing URF pattern. Fixed RunBasePackageTests.ps1 to auto-detect repo root and MSBuild so it works from any directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...Microsoft.WindowsAppSDK.BaseCommon.targets | 6 +++ .../CPP/BasePackageTestCpp.vcxproj | 5 +- .../BasePackageTest/CS/BasePackageTest.csproj | 5 +- base/test/RunBasePackageTests.ps1 | 47 +++++++++++++++---- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets index 1ff91b15c3..7026664b0e 100644 --- a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets @@ -46,6 +46,12 @@ Text="Undocked Reg-Free WinRT activation is required for self-contained apps targeting Windows versions prior to 10.0.18362.0. Remove the WindowsAppSdkUndockedRegFreeWinRTInitialize=false setting." /> + + + + + diff --git a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj index 08dd8b0d53..6efcd1db30 100644 --- a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj +++ b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj @@ -156,11 +156,10 @@ false <_WindowsAppSDKSkipBootstrapRequiredCheck>true false - false - false + true - diff --git a/base/test/BasePackageTest/CS/BasePackageTest.csproj b/base/test/BasePackageTest/CS/BasePackageTest.csproj index 20586d8a3f..9a9427cd91 100644 --- a/base/test/BasePackageTest/CS/BasePackageTest.csproj +++ b/base/test/BasePackageTest/CS/BasePackageTest.csproj @@ -99,12 +99,11 @@ false <_WindowsAppSDKSkipBootstrapRequiredCheck>true false - false - false + true EXPECT_NO_BOOTSTRAP - diff --git a/base/test/RunBasePackageTests.ps1 b/base/test/RunBasePackageTests.ps1 index dcc82b0f58..b1c4ddec6c 100644 --- a/base/test/RunBasePackageTests.ps1 +++ b/base/test/RunBasePackageTests.ps1 @@ -1,8 +1,8 @@ # RunBasePackageTests.ps1 # Builds all Base package test configurations and verifies results. -# Usage: .\base\test\RunBasePackageTests.ps1 +# Can be run from any directory — automatically finds repo root. param( - [string]$MsBuildPath = "F:\Program Files\Microsoft Visual Studio\18\Insiders\MSBuild\Current\Bin\MSBuild.exe" + [string]$MsBuildPath ) Set-StrictMode -Version 3.0 @@ -10,6 +10,36 @@ $ErrorActionPreference = 'Continue' $script:PassCount = 0 $script:FailCount = 0 +# Find repo root (walk up from script location looking for .git) +$scriptDir = $PSScriptRoot +$repoRoot = $scriptDir +while ($repoRoot -and !(Test-Path (Join-Path $repoRoot ".git"))) { + $repoRoot = Split-Path $repoRoot -Parent +} +if (!$repoRoot -or !(Test-Path (Join-Path $repoRoot ".git"))) { + Write-Host "ERROR: Could not find repo root from $scriptDir" -ForegroundColor Red + exit 1 +} +Write-Host "Repo root: $repoRoot" +Push-Location $repoRoot + +# Auto-detect MSBuild if not specified +if (!$MsBuildPath) { + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + if (Test-Path $vswhere) { + $vsPath = & $vswhere -latest -requires Microsoft.Component.MSBuild -property installationPath 2>$null + if ($vsPath) { + $MsBuildPath = Join-Path $vsPath "MSBuild\Current\Bin\MSBuild.exe" + } + } + if (!$MsBuildPath -or !(Test-Path $MsBuildPath)) { + Write-Host "ERROR: Could not find MSBuild. Pass -MsBuildPath explicitly." -ForegroundColor Red + Pop-Location + exit 1 + } + Write-Host "MSBuild: $MsBuildPath" +} + function Test-BuildSuccess { param([string]$Name, [string]$BuildCmd, [scriptblock]$Verify) @@ -165,11 +195,11 @@ Test-BuildError "C# 7: RS5_SC_Pkg_NoURF" ` "dotnet build $csProj -c RS5_SC_Pkg_NoURF --no-incremental --no-restore -v q 2>&1" ` "Undocked Reg-Free WinRT activation is required for self-contained apps targeting Windows versions prior to 10.0.18362.0" -# Config 8: RS5_FD_Pkg — no bootstrap DLLs +# Config 8: RS5_FD_Pkg — ERROR expected (DeploymentMgr requires Foundation) dotnet restore $csProj -p:Configuration=RS5_FD_Pkg 2>&1 | Out-Null -Test-BuildSuccess "C# 8: RS5_FD_Pkg" ` +Test-BuildError "C# 8: RS5_FD_Pkg" ` "dotnet build $csProj -c RS5_FD_Pkg --no-incremental --no-restore -v q 2>&1" ` - { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\RS5_FD_Pkg\net8.0-windows10.0.17763.0\win-x64" -AllowedDlls $csAllowed } + "DeploymentManager initialization requires the Microsoft.WindowsAppSDK.Foundation package" # Config 9: RS5_SC_Pkg_URF_Fdn — Foundation referenced, URF=true, no bootstrap DLLs # Foundation adds extra DLLs but bootstrap should still be absent (SC=true) @@ -232,10 +262,10 @@ Test-BuildError "C++ 7: RS5_SC_Pkg_NoURF" ` "& $msbuild $cppProj /p:Configuration=RS5_SC_Pkg_NoURF /p:Platform=x64 /nr:false /v:q 2>&1" ` "Undocked Reg-Free WinRT activation is required for self-contained apps targeting Windows versions prior to 10.0.18362.0" -# Config 8: RS5_FD_Pkg — no DLLs -Test-BuildSuccess "C++ 8: RS5_FD_Pkg" ` +# Config 8: RS5_FD_Pkg — ERROR expected (DeploymentMgr requires Foundation) +Test-BuildError "C++ 8: RS5_FD_Pkg" ` "& $msbuild $cppProj /p:Configuration=RS5_FD_Pkg /p:Platform=x64 /nr:false /v:q 2>&1" ` - { Test-NoDlls "base\test\BasePackageTest\CPP\out\RS5_FD_Pkg\x64" } + "DeploymentManager initialization requires the Microsoft.WindowsAppSDK.Foundation package" # Config 9: RS5_SC_Pkg_URF_Fdn — Foundation simulated, URF=true, no DLLs Test-BuildSuccess "C++ 9: RS5_SC_Pkg_URF_Fdn" ` @@ -249,4 +279,5 @@ Write-Host "`n======================" -ForegroundColor White Write-Host "Results: $script:PassCount passed, $script:FailCount failed" -ForegroundColor $(if ($script:FailCount -eq 0) { "Green" } else { "Red" }) Write-Host "======================" -ForegroundColor White +Pop-Location exit $script:FailCount From bb03efe2b296bf69b08297811df9bbd8a22b9f5b Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 14:31:38 -0400 Subject: [PATCH 12/41] Fix Nightly/Official pipeline YAML paths for GitHub repo Update template references to use correct relative paths and @self suffix when running from base/build/ in the GitHub repo: - ../../build/WindowsAppSDK-CommonVariables.yml (relative to file) - @self suffix for stages templates inside extends block - Forward slashes for consistency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- base/build/WindowsAppSDK-BuildBase-Nightly.yml | 8 ++++---- .../build/WindowsAppSDK-BuildBase-Official.yml | 8 ++++---- .../CPP/BasePackageTestCpp.vcxproj | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/base/build/WindowsAppSDK-BuildBase-Nightly.yml b/base/build/WindowsAppSDK-BuildBase-Nightly.yml index d3f2e50ee4..825cd73eb5 100644 --- a/base/build/WindowsAppSDK-BuildBase-Nightly.yml +++ b/base/build/WindowsAppSDK-BuildBase-Nightly.yml @@ -48,8 +48,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time - 'preview' variables: -- template: build\WindowsAppSDK-CommonVariables.yml -- template: AzurePipelinesTemplates\WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: ../../build/WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates/WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig - template: WindowsAppSDK-Aggregator-TestConfig.yml@WindowsAppSDKConfig - group: WindowsAppSDK-Build-Variables # Only the "WinAppSDK-Build-PR (OneBranch)" pipeline is currently prepped for 1ES hosted image validation. @@ -135,11 +135,11 @@ extends: # ob_outputDirectory instead, hence, the two rounds may catch different issues. stages: - - template: AzurePipelinesTemplates\WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator + - template: AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator parameters: ServicingTag: ${{ parameters.ServicingTag }} - - template: base\build\AzurePipelinesTemplates\WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml + - template: base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self parameters: IsOfficial: false PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} diff --git a/base/build/WindowsAppSDK-BuildBase-Official.yml b/base/build/WindowsAppSDK-BuildBase-Official.yml index 41275edbea..c269c0d07d 100644 --- a/base/build/WindowsAppSDK-BuildBase-Official.yml +++ b/base/build/WindowsAppSDK-BuildBase-Official.yml @@ -48,8 +48,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time - 'preview' variables: -- template: build\WindowsAppSDK-CommonVariables.yml -- template: AzurePipelinesTemplates\WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: ../../build/WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates/WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig - template: WindowsAppSDK-Aggregator-TestConfig.yml@WindowsAppSDKConfig - group: WindowsAppSDK-Build-Variables # Only the "WinAppSDK-Build-PR (OneBranch)" pipeline is currently prepped for 1ES hosted image validation. @@ -134,11 +134,11 @@ extends: # ob_outputDirectory instead, hence, the two rounds may catch different issues. stages: - - template: AzurePipelinesTemplates\WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator + - template: AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator parameters: ServicingTag: ${{ parameters.ServicingTag }} - - template: base\build\AzurePipelinesTemplates\WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml + - template: base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self parameters: IsOfficial: true PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} diff --git a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj index 6efcd1db30..e791c88733 100644 --- a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj +++ b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj @@ -46,7 +46,7 @@ 10.0 - + Application false @@ -57,7 +57,7 @@ None - @@ -77,7 +77,7 @@ false - + Application false @@ -93,7 +93,7 @@ false - + Application false @@ -109,7 +109,7 @@ false - + Application false @@ -120,7 +120,7 @@ true - + Application false @@ -131,7 +131,7 @@ true - + Application false @@ -143,7 +143,7 @@ false - + Application false @@ -159,7 +159,7 @@ true - From 778a94c4f9766b7ab498da91a1ac6e2eb6c23e1f Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 17:22:52 -0400 Subject: [PATCH 13/41] copyright headers --- .../CPP/BasePackageTestCpp.vcxproj | 65 ++++++------------- base/test/BasePackageTest/CPP/main.cpp | 3 + base/test/BasePackageTest/CS/Program.cs | 3 + 3 files changed, 27 insertions(+), 44 deletions(-) diff --git a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj index e791c88733..b502045999 100644 --- a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj +++ b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj @@ -44,27 +44,25 @@ {A1B2C3D4-E5F6-7890-ABCD-EF1234567890} BasePackageTestCpp 10.0 - - - - Application false v143 Unicode + + + + 10.0.26100.0 true None - - Application - false - v143 - Unicode 10.0.17763.0 false None @@ -77,12 +75,9 @@ false - + - Application - false - v143 - Unicode 10.0.26100.0 false None @@ -93,12 +88,9 @@ false - + - Application - false - v143 - Unicode 10.0.17763.0 false None @@ -109,46 +101,34 @@ false - + - Application - false - v143 - Unicode 10.0.18362.0 true true - + - Application - false - v143 - Unicode 10.0.17763.0 true true - + - Application - false - v143 - Unicode 10.0.17763.0 true true false - + - Application - false - v143 - Unicode 10.0.17763.0 false true @@ -159,14 +139,11 @@ true - - Application - false - v143 - Unicode 10.0.17763.0 true true diff --git a/base/test/BasePackageTest/CPP/main.cpp b/base/test/BasePackageTest/CPP/main.cpp index bd73890f96..968b4d9100 100644 --- a/base/test/BasePackageTest/CPP/main.cpp +++ b/base/test/BasePackageTest/CPP/main.cpp @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + // Validates Base package binplacement behavior for different configurations. // EXPECT_NO_DLLS: No DLLs expected alongside the exe. // EXPECT_BOOTSTRAP: Bootstrap DLL MUST be present alongside the exe. diff --git a/base/test/BasePackageTest/CS/Program.cs b/base/test/BasePackageTest/CS/Program.cs index b24a734d18..28dbf6c481 100644 --- a/base/test/BasePackageTest/CS/Program.cs +++ b/base/test/BasePackageTest/CS/Program.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + // Validates Base package binplacement behavior for different configurations. // EXPECT_NO_BOOTSTRAP: Only app DLLs expected, no bootstrap. // EXPECT_BOOTSTRAP: Bootstrap DLLs MUST be present. From 882668047a931b057dd0d2c7b7847ebfb957413b Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 13 Mar 2026 17:23:41 -0400 Subject: [PATCH 14/41] Fix CompatibilitySetter test imports to base\build\NuSpecs The targets files moved from build\NuSpecs\ to base\build\NuSpecs\. Update test project imports to the new paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Test_CompatibilitySetter_CPP.vcxproj | 2 +- .../Test_CompatibilitySetter_CS.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj b/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj index 0a92dc1c24..27ffd44ebb 100644 --- a/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj +++ b/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj @@ -145,7 +145,7 @@ - + diff --git a/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj b/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj index 5c31a7be02..936176f6b2 100644 --- a/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj +++ b/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj @@ -21,7 +21,7 @@ None, None, (RuntimeCompatibilityChange)23456, None - + From bdceed33402c5ef6bcca04596fdf9324cbd09636 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Mon, 16 Mar 2026 10:07:39 -0400 Subject: [PATCH 15/41] Fix PayloadTracking template path for cross-repo reference When referenced via @WindowsAppSDKAggregator from an external repo, the path must be relative to the aggregator repo root (build/...). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- base/build/WindowsAppSDK-BuildBase-Nightly.yml | 2 +- base/build/WindowsAppSDK-BuildBase-Official.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/build/WindowsAppSDK-BuildBase-Nightly.yml b/base/build/WindowsAppSDK-BuildBase-Nightly.yml index 825cd73eb5..4d78448732 100644 --- a/base/build/WindowsAppSDK-BuildBase-Nightly.yml +++ b/base/build/WindowsAppSDK-BuildBase-Nightly.yml @@ -135,7 +135,7 @@ extends: # ob_outputDirectory instead, hence, the two rounds may catch different issues. stages: - - template: AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator + - template: build/AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator parameters: ServicingTag: ${{ parameters.ServicingTag }} diff --git a/base/build/WindowsAppSDK-BuildBase-Official.yml b/base/build/WindowsAppSDK-BuildBase-Official.yml index c269c0d07d..a75a96da36 100644 --- a/base/build/WindowsAppSDK-BuildBase-Official.yml +++ b/base/build/WindowsAppSDK-BuildBase-Official.yml @@ -134,7 +134,7 @@ extends: # ob_outputDirectory instead, hence, the two rounds may catch different issues. stages: - - template: AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator + - template: build/AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator parameters: ServicingTag: ${{ parameters.ServicingTag }} From a23e064d2434cc6685d5382ea7f957be9e013262 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Mon, 16 Mar 2026 10:08:32 -0400 Subject: [PATCH 16/41] Fix stages template path: relative to YAML file, not repo root In OneBranch extends block, @self templates resolve relative to the YAML file's directory, not the repo root. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- base/build/WindowsAppSDK-BuildBase-Nightly.yml | 2 +- base/build/WindowsAppSDK-BuildBase-Official.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/build/WindowsAppSDK-BuildBase-Nightly.yml b/base/build/WindowsAppSDK-BuildBase-Nightly.yml index 4d78448732..63465d0ba7 100644 --- a/base/build/WindowsAppSDK-BuildBase-Nightly.yml +++ b/base/build/WindowsAppSDK-BuildBase-Nightly.yml @@ -139,7 +139,7 @@ extends: parameters: ServicingTag: ${{ parameters.ServicingTag }} - - template: base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self + - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self parameters: IsOfficial: false PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} diff --git a/base/build/WindowsAppSDK-BuildBase-Official.yml b/base/build/WindowsAppSDK-BuildBase-Official.yml index a75a96da36..6cd058efe0 100644 --- a/base/build/WindowsAppSDK-BuildBase-Official.yml +++ b/base/build/WindowsAppSDK-BuildBase-Official.yml @@ -138,7 +138,7 @@ extends: parameters: ServicingTag: ${{ parameters.ServicingTag }} - - template: base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self + - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self parameters: IsOfficial: true PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} From 675c1e095905371b82eb38139bc591b7e77e6d99 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Mon, 16 Mar 2026 12:49:32 -0400 Subject: [PATCH 17/41] Remove PayloadTracking stage and unused repo resources from Base pipelines PayloadTracking references a script from the aggregator repo that doesn't exist in WindowsAppSDK. Its failure blocked the main build stage via succeeded() condition. Base builds don't need payload tracking. Also removed unused WindowsAppSDKAggregator and WindowsAppSDKSamples repository resources. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- base/build/WindowsAppSDK-BuildBase-Nightly.yml | 17 ----------------- base/build/WindowsAppSDK-BuildBase-Official.yml | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/base/build/WindowsAppSDK-BuildBase-Nightly.yml b/base/build/WindowsAppSDK-BuildBase-Nightly.yml index 63465d0ba7..056ca7e283 100644 --- a/base/build/WindowsAppSDK-BuildBase-Nightly.yml +++ b/base/build/WindowsAppSDK-BuildBase-Nightly.yml @@ -26,10 +26,6 @@ parameters: # parameters are shown up in ADO UI in a build queue time displayName: "Sign packages and their contents" type: boolean default: true -- name: "ServicingTag" - displayName: "ServicingTag (Runs PayloadTracking's VerifyingServicingRelease if Provided)" - type: string - default: 'PlaceHolder' - name: runStaticAnalysis displayName: "Run Static Analysis (e.g., PREFast, APIScan)" type: boolean @@ -66,15 +62,6 @@ resources: type: git name: OneBranch.Pipelines/GovernedTemplates ref: refs/heads/main - - repository: WindowsAppSDKAggregator - type: git - name: ProjectReunion/WindowsAppSDKAggregator - ref: refs/heads/main - - repository: WindowsAppSDKSamples - type: github - endpoint: 'GitHub - benkuhn - 2-18' - name: microsoft/WindowsAppSDK-Samples - ref: $(SamplesBranch) - repository: WindowsAppSDKConfig type: git name: ProjectReunion/WindowsAppSDKConfig @@ -135,10 +122,6 @@ extends: # ob_outputDirectory instead, hence, the two rounds may catch different issues. stages: - - template: build/AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator - parameters: - ServicingTag: ${{ parameters.ServicingTag }} - - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self parameters: IsOfficial: false diff --git a/base/build/WindowsAppSDK-BuildBase-Official.yml b/base/build/WindowsAppSDK-BuildBase-Official.yml index 6cd058efe0..330105bf54 100644 --- a/base/build/WindowsAppSDK-BuildBase-Official.yml +++ b/base/build/WindowsAppSDK-BuildBase-Official.yml @@ -26,10 +26,6 @@ parameters: # parameters are shown up in ADO UI in a build queue time displayName: "Sign packages and their contents" type: boolean default: true -- name: "ServicingTag" - displayName: "ServicingTag (Runs PayloadTracking's VerifyingServicingRelease if Provided)" - type: string - default: 'PlaceHolder' - name: runStaticAnalysis displayName: "Run Static Analysis (e.g., PREFast, APIScan)" type: boolean @@ -66,15 +62,6 @@ resources: type: git name: OneBranch.Pipelines/GovernedTemplates ref: refs/heads/main - - repository: WindowsAppSDKAggregator - type: git - name: ProjectReunion/WindowsAppSDKAggregator - ref: refs/heads/main - - repository: WindowsAppSDKSamples - type: github - endpoint: 'GitHub - benkuhn - 2-18' - name: microsoft/WindowsAppSDK-Samples - ref: $(SamplesBranch) - repository: WindowsAppSDKConfig type: git name: ProjectReunion/WindowsAppSDKConfig @@ -134,10 +121,6 @@ extends: # ob_outputDirectory instead, hence, the two rounds may catch different issues. stages: - - template: build/AzurePipelinesTemplates/WindowsAppSDK-PayloadTrackingTool-Stage.yml@WindowsAppSDKAggregator - parameters: - ServicingTag: ${{ parameters.ServicingTag }} - - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self parameters: IsOfficial: true From 26dcd7ee1da566408643c96cad932d519866833a Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Mon, 16 Mar 2026 15:29:55 -0400 Subject: [PATCH 18/41] Fix Bootstrap DLL lifetime: use raw HMODULE to match delay-load semantics The original Bootstrap DLL used delay-loading for Microsoft.WindowsAppRuntime.dll. When the helper app freed Bootstrap.dll, the runtime DLL stayed loaded because the delay-load helper's LoadLibrary ref persists independently. Our GetProcAddress approach stored the handle in a wil::unique_hmodule global, whose destructor freed the runtime DLL when Bootstrap.dll was unloaded. This destroyed the in-process package graph state on Win10 (managed by the runtime DLL, not the OS), causing WinRT activation failures and test timeouts. Fix: Use a raw HMODULE with no destructor, matching the original delay-load behavior. Only MddBootstrapShutdown explicitly frees the handle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../MddBootstrap.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp index a40cd23c8b..8917f768a1 100644 --- a/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp +++ b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp @@ -111,7 +111,13 @@ static UsingWin11Support g_usingWin11Support{ UsingWin11Support::Unknown }; static IDynamicDependencyLifetimeManager* g_lifetimeManager{}; static wil::unique_event g_endTheLifetimeManagerEvent; -static wil::unique_hmodule g_windowsAppRuntimeDll; +// Raw HMODULE (not unique_hmodule) to match delay-load lifetime semantics: +// The runtime DLL must NOT be freed when Bootstrap.dll is unloaded, +// because the helper app pattern loads Bootstrap.dll into a local unique_hmodule, +// calls MddBootstrapInitialize, then frees Bootstrap.dll. The runtime DLL must +// stay loaded so its in-process package graph state persists for WinRT activation. +// Only MddBootstrapShutdown explicitly frees this handle. +static HMODULE g_windowsAppRuntimeDll{}; static PFN_MddTryCreatePackageDependency g_pfnMddTryCreatePackageDependency{}; static PFN_MddAddPackageDependency g_pfnMddAddPackageDependency{}; static PFN_MddRemovePackageDependency g_pfnMddRemovePackageDependency{}; @@ -287,7 +293,11 @@ STDAPI_(void) MddBootstrapShutdown() noexcept g_pfnMddAddPackageDependency = nullptr; g_pfnMddRemovePackageDependency = nullptr; g_pfnVersionInfoTestInitialize = nullptr; - g_windowsAppRuntimeDll.reset(); + if (g_windowsAppRuntimeDll) + { + FreeLibrary(g_windowsAppRuntimeDll); + g_windowsAppRuntimeDll = nullptr; + } if (g_endTheLifetimeManagerEvent) { @@ -447,7 +457,7 @@ void FirstTimeInitialization( { FAIL_FAST_IF_FAILED(pfnTestInit(frameworkPackageFamilyName.c_str(), nullptr)); } - g_windowsAppRuntimeDll = std::move(windowsAppRuntimeDll); + g_windowsAppRuntimeDll = windowsAppRuntimeDll.release(); g_pfnVersionInfoTestInitialize = pfnTestInit; } } @@ -551,7 +561,7 @@ void FirstTimeInitialization( // g_lifetimeManager = lifetimeManager.detach(); g_endTheLifetimeManagerEvent = std::move(endTheLifetimeManagerEvent); - g_windowsAppRuntimeDll = std::move(windowsAppRuntimeDll); + g_windowsAppRuntimeDll = windowsAppRuntimeDll.release(); g_pfnMddTryCreatePackageDependency = pfnTryCreate; g_pfnMddAddPackageDependency = pfnAdd; g_pfnMddRemovePackageDependency = pfnRemove; From 44359ef60bfc35415f63bb879bf43e62969ad74e Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Mon, 16 Mar 2026 16:01:53 -0400 Subject: [PATCH 19/41] Fix Base Nightly/Official build name to use \ variable Replace \ (undefined) with \ from CommonVariables.yml, matching all Foundation pipeline conventions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- base/build/WindowsAppSDK-BuildBase-Nightly.yml | 2 +- base/build/WindowsAppSDK-BuildBase-Official.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/build/WindowsAppSDK-BuildBase-Nightly.yml b/base/build/WindowsAppSDK-BuildBase-Nightly.yml index 056ca7e283..d74622cbfd 100644 --- a/base/build/WindowsAppSDK-BuildBase-Nightly.yml +++ b/base/build/WindowsAppSDK-BuildBase-Nightly.yml @@ -71,7 +71,7 @@ resources: name: ProjectReunion/WindowsAppSDKConfig ref: refs/heads/main -name: $(MajorVersion).$(MinorVersion).$(date:yyMM)$(date:dd).$(Revision)-${{ parameters.BuildType }} +name: $(version) extends: template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates diff --git a/base/build/WindowsAppSDK-BuildBase-Official.yml b/base/build/WindowsAppSDK-BuildBase-Official.yml index 330105bf54..eb1d5bf8f6 100644 --- a/base/build/WindowsAppSDK-BuildBase-Official.yml +++ b/base/build/WindowsAppSDK-BuildBase-Official.yml @@ -71,7 +71,7 @@ resources: name: ProjectReunion/WindowsAppSDKConfig ref: refs/heads/main -name: $(MajorVersion).$(MinorVersion).$(date:yyMM)$(date:dd).$(Revision)-${{ parameters.BuildType }} +name: $(version) extends: template: v2/Microsoft.Official.yml@templates # https://aka.ms/obpipelines/templates From bc1a2f461c7b6fbd592afa7ded88179b0d946ccd Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Tue, 17 Mar 2026 12:39:23 -0400 Subject: [PATCH 20/41] Fix Bootstrap shutdown: call Win11 RemovePackageDependency on Win11 path The old code called MddRemovePackageDependency via delay-load from the runtime DLL, which worked for both Win11 and DDLM paths. Our GetProcAddress approach only resolved g_pfnMddRemovePackageDependency in the DDLM path, so the Win11 path skipped the call entirely, leaving the package dependency in the OS graph. This caused cascading failures: StoragePickers ClassSetup couldn't re-register the framework package (0x80073D02 'package in use'), and DynamicDependency GetCurrentPackageInfo returned wrong results after shutdown. Fix: Check g_usingWin11Support and call MddCore::Win11::RemovePackageDependency directly on the Win11 path, matching the old delay-load behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp index 8917f768a1..427a894755 100644 --- a/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp +++ b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp @@ -280,7 +280,11 @@ STDAPI_(void) MddBootstrapShutdown() noexcept // Last one out turn out the lights... if (g_packageDependencyContext) { - if (g_pfnMddRemovePackageDependency) + if (g_usingWin11Support == UsingWin11Support::Yes) + { + MddCore::Win11::RemovePackageDependency(g_packageDependencyContext); + } + else if (g_pfnMddRemovePackageDependency) { g_pfnMddRemovePackageDependency(g_packageDependencyContext); } From a49a2dfac0d06677206666f5e1cd9164783df3e1 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 19 Mar 2026 16:02:40 -0400 Subject: [PATCH 21/41] Update Base dependency version in Foundation's Version.Details.xml The Foundation nuspec dependency on Base is stamped from this file at build time. The old version (2.0.260122002-experimental) was higher than the new Base package version (2.0.0-20260317.0) per NuGet semver ordering, causing NU1605 downgrade errors in the aggregator build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dc951af3a4..b4f6a7dd39 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - - https://dev.azure.com/microsoft/ProjectReunion/_git/WindowsAppSDKAggregator - e8a2bfd2258e2a61c2b3e6d3692d5ed45eb9cde5 + + https://github.com/microsoft/WindowsAppSDK + bc1a2f461c7b6fbd592afa7ded88179b0d946ccd https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP From 98cd3ce960693301a7d42a0b7f150fdddfac3258 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 20 Mar 2026 11:42:02 -0400 Subject: [PATCH 22/41] Fix Base package version to use component format (Major.Minor.YYMMDDnnn-buildType) The old version format (2.0.0-YYYYMMDD.N) produced versions that NuGet semver considers lower than existing dependencies like 2.0.2-preview (from InteractiveExperiences), causing NU1605 downgrade errors in the aggregator. Switch to the same component version format used by Foundation: Major.Minor.YYMMDDnnn-buildType (e.g. 2.0.260320000-experimental). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...wsAppSDK-BuildWindowsAppSDKBase-Stages.yml | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml index 820d0104a5..0806fd0bcb 100644 --- a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -149,12 +149,16 @@ stages: inputs: targetType: 'inline' script: | - $version = '$(version)' + # Build the component package version using the same format as Foundation: + # {Major}.{Minor}.{YYMMDDnnn}-{buildType} + # This ensures Base version sorts higher than existing dependencies like 2.0.2-preview + $paddedRevision = ([string]$(versionCounter)).PadLeft(3, '0') + $buildType = '${{ parameters.BuildType }}' + $version = '$(MajorVersion).$(MinorVersion).$(versionMinDate)' + $paddedRevision + '-' + $buildType # For official builds, allow VersionTag override if ('${{ parameters.IsOfficial }}' -eq 'true') { - $buildType = '${{ parameters.BuildType }}' $versionTag = '$(VersionTag)' # Allow override from pipeline variable @@ -182,25 +186,13 @@ stages: Write-Host "##vso[task.complete result=Failed;]DONE" } + $formattedTag = '' if(-not [String]::IsNullOrEmpty($versionTag)) { - # Replace the prerelease tag portion of the version - $dashIndex = $version.IndexOf('-') - if ($dashIndex -gt 0) { - $version = $version.Substring(0, $dashIndex) + '-' + $versionTag - } else { - $version = $version + '-' + $versionTag - } - } - elseif ($buildType -eq "stable") - { - # Stable: strip prerelease tag entirely - $dashIndex = $version.IndexOf('-') - if ($dashIndex -gt 0) { - $version = $version.Substring(0, $dashIndex) - } + $formattedTag = '-' + $versionTag } Write-Host "Using Release Versioning" + $version = '$(MajorVersion).$(MinorVersion).$(versionMinDate)' + $paddedRevision + $formattedTag } # Write the version to Version.Details.xml for BuildAll.ps1 to read from From 63c8b4dff4dc1ba1e35d647b9b3958e3021b6749 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 20 Mar 2026 13:51:18 -0400 Subject: [PATCH 23/41] Remove Bootstrap.lib and Bootstrap.dll references from Foundation native props These assets moved to the Base package. The Foundation native props still referenced Bootstrap.lib (AdditionalDependencies) and Bootstrap.dll (CopyToOutDir target), causing link errors for native samples. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../native/Microsoft.WindowsAppSDK.C.props | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props b/build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props index c78e03fa11..3a5404ba72 100644 --- a/build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props +++ b/build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props @@ -23,20 +23,6 @@ - - - - $(_FoundationLibFolder)\Microsoft.WindowsAppRuntime.Bootstrap.lib; - %(AdditionalDependencies); - - - - - - - + From 34ab7d2a57ce636730488afa71a307c95b933391 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Mon, 23 Mar 2026 12:54:41 -0400 Subject: [PATCH 24/41] Update Base version to new format and add installer skip logging Update Version.Details.xml to reference Base version 2.0.260323000-experimental (new YYMMDDnnn format) at SHA 63c8b4dff which includes the pipeline YAML fix. The old format (2.0.0-20260317.0) had patch=0 which is lower than InteractiveExperiences' requirement of Base >= 2.0.2-preview, causing NU1605. Also add diagnostic logging in the installer when a package is skipped because it's already installed and OK (previously completely silent). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 4 ++-- installer/dev/install.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b4f6a7dd39..115c9fcc38 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - + https://github.com/microsoft/WindowsAppSDK - bc1a2f461c7b6fbd592afa7ded88179b0d946ccd + 63c8b4dff4dc1ba1e35d647b9b3958e3021b6749 https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP diff --git a/installer/dev/install.cpp b/installer/dev/install.cpp index e3a9b25d36..cb49fe5d80 100644 --- a/installer/dev/install.cpp +++ b/installer/dev/install.cpp @@ -353,6 +353,11 @@ namespace WindowsAppRuntimeInstaller { if (isPackageInstalledAndIsPackageStatusOK) { + if (!quiet) + { + std::wcout << std::endl; + std::wcout << L"Package already installed: " << packageProperties->fullName.get() << std::endl; + } // If currently installed Package (either same or higher version than the version from the installer) is in good state, clear the package higher version and return. installActivityContext.SetExistingPackageIfHigherVersion(L""); return; From bb3e8e7b18eff8405ab03d85b1609ee132ee0262 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Mon, 23 Mar 2026 17:44:10 -0400 Subject: [PATCH 25/41] Add retry logic to dotnet runtime installer download The download of .NET 5.0.5 Desktop Runtime from the VS CDN intermittently returns 503 (Server Unavailable), causing the entire Foundation build to fail. Add retry with exponential backoff (30s, 60s, 90s) to handle transient CDN errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../DownloadDotNetRuntimeInstaller.ps1 | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/build/scripts/DownloadDotNetRuntimeInstaller.ps1 b/build/scripts/DownloadDotNetRuntimeInstaller.ps1 index 53789f6562..7a1a588c0d 100644 --- a/build/scripts/DownloadDotNetRuntimeInstaller.ps1 +++ b/build/scripts/DownloadDotNetRuntimeInstaller.ps1 @@ -41,7 +41,27 @@ else if(-not(Test-Path $outputPath)) { Write-Host "Downloading $downloadurl to $outputPath" - Invoke-WebRequest $downloadurl -OutFile $outputPath -UseBasicParsing + $maxRetries = 3 + for ($retry = 1; $retry -le $maxRetries; $retry++) + { + try + { + Invoke-WebRequest $downloadurl -OutFile $outputPath -UseBasicParsing + Write-Host "Download succeeded." + break + } + catch + { + Write-Host "Download attempt $retry of $maxRetries failed: $_" + if ($retry -eq $maxRetries) + { + throw + } + $delay = $retry * 30 + Write-Host "Retrying in $delay seconds..." + Start-Sleep -Seconds $delay + } + } } else { From 0e35ef20eb7d2f20d3bf28c5eaaea55db7e1df8b Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Tue, 24 Mar 2026 10:00:06 -0400 Subject: [PATCH 26/41] Make .NET 5 Desktop Runtime download non-blocking The .NET 5.0.5 Desktop Runtime CDN URL consistently returns 503 from CI agents, hard-failing the entire Foundation build. Tests target .NET 6, not .NET 5, so this download is not critical. - Add continueOnError: true to the download step - Add continueOnError: true and file-exists guard to the install step - Retain retry logic from prior commit for when the CDN is available Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../WindowsAppSDK-RunTests-Steps.yml | 7 ++++++- .../WindowsAppSDK-SetupBuildEnvironment-Steps.yml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml index 6d2970c148..93aa5443ee 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml @@ -74,10 +74,15 @@ steps: - task: powerShell@2 displayName: 'Run dotnet installer' + continueOnError: true inputs: targetType: 'inline' script: | - $(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe /quiet /install /norestart + if (Test-Path "$(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe") { + & "$(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe" /quiet /install /norestart + } else { + Write-Host "##[warning]dotnet Desktop Runtime installer not found - skipping (.NET 5 download may have failed)" + } - task: PowerShell@2 displayName: 'Install VCLibs and VCLibs Desktop' diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml index bdda080f76..8fbd5c8736 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml @@ -85,6 +85,7 @@ steps: - task: PowerShell@2 displayName: 'Download dotnet installer' + continueOnError: true condition: or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64'), eq(variables['buildPlatform'], 'arm64')) inputs: targetType: filePath From 7ba0bd36ad66eea4c29a47cf31c7624b5084c14e Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Tue, 24 Mar 2026 16:48:23 -0400 Subject: [PATCH 27/41] Fix Base targets: link Bootstrap.lib for unpackaged apps only The condition for adding Bootstrap.lib should check AppxPackage (packaged vs unpackaged) not WindowsAppSDKSelfContained. Packaged apps don't use bootstrap; unpackaged apps (including self-contained) need it for MddBootstrapInitialize. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets index c703002926..a0c5795315 100644 --- a/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets +++ b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets @@ -15,8 +15,8 @@ - - + + $(MSBuildThisFileDirectory)..\..\lib\win10-$(_WindowsAppSDKBasePlatform)\Microsoft.WindowsAppRuntime.Bootstrap.lib;%(AdditionalDependencies) From 5f6e84187c2b1c9742c0c897ee60dc19e716fcd4 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Tue, 24 Mar 2026 17:23:09 -0400 Subject: [PATCH 28/41] Update Base dependency to 2.0.260324000-experimental Points to Base build 142815657 which includes the AppxPackage condition fix for Bootstrap.lib linking in Base.targets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 115c9fcc38..505cba3090 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - + https://github.com/microsoft/WindowsAppSDK - 63c8b4dff4dc1ba1e35d647b9b3958e3021b6749 + 7ba0bd36ad66eea4c29a47cf31c7624b5084c14e https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP From 9295b3e4e014f668122655a48476c2337caabf3e Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Wed, 25 Mar 2026 09:52:20 -0400 Subject: [PATCH 29/41] Fix SelfContained default: exclude packaged apps from auto-default Packaged apps (AppxPackage=true) use framework package dependencies in their manifest and should not default to SelfContained mode. The previous condition only checked for the absence of the Runtime package, causing packaged apps built within the Foundation pipeline (without the aggregator meta-package) to incorrectly build as SelfContained. This caused the WPF sample app to crash on launch because SelfContained initialization conflicted with the framework-dependent packaged deployment model. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets index 7026664b0e..d514bcc382 100644 --- a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets @@ -6,8 +6,8 @@ --> - - + + true <_WindowsAppSDKSelfContainedSetByDefault>true From 2be1a3f630d4e2ac091ef2901d1f841b76d5dcb6 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Wed, 25 Mar 2026 10:35:20 -0400 Subject: [PATCH 30/41] Update Base dependency to 2.0.260325000-experimental Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 505cba3090..71b5b89b98 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - + https://github.com/microsoft/WindowsAppSDK - 7ba0bd36ad66eea4c29a47cf31c7624b5084c14e + 9295b3e4e014f668122655a48476c2337caabf3e https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP From 27785440b9aa8f0af904d52aeb9ffff32dd72901 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Wed, 25 Mar 2026 13:20:43 -0400 Subject: [PATCH 31/41] Fix framework-dependent error target: exclude packaged and component builds The WindowsAppSDKFrameworkPackageDependentWithoutPackages error fires when SelfContained is not set and the aggregator Runtime package is absent. This is too aggressive for: - Packaged apps (AppxPackage=true) that use framework package dependencies - WAP projects (.wapproj) that are packaging containers - Apps built within the Foundation pipeline that reference component packages directly (WindowsAppSdkComponentPackages item set by Foundation.props) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.WindowsAppSDK.BaseCommon.targets | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets index d514bcc382..2e8cf34c0d 100644 --- a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets @@ -22,8 +22,18 @@ - - + + From c2963fcefdb30a80d8291dda8fca14f1d4ac8f00 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Wed, 25 Mar 2026 14:02:39 -0400 Subject: [PATCH 32/41] Update Base dependency to 2.0.260325001-experimental Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 71b5b89b98..2de847fc0c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - + https://github.com/microsoft/WindowsAppSDK - 9295b3e4e014f668122655a48476c2337caabf3e + 27785440b9aa8f0af904d52aeb9ffff32dd72901 https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP From 872f5978a9dbccba71aafd3fb76de13cc91262c3 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 26 Mar 2026 09:40:27 -0400 Subject: [PATCH 33/41] Fix SelfContained default: use WindowsAppSdkFoundation instead of AppxPackage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AppxPackage is not set at property evaluation time for inner projects in WAP packaging solutions. This caused the SelfContained default to activate for framework-dependent packaged apps, triggering manifest merge with in-process server registrations that broke app activation. Use WindowsAppSdkFoundation (set by Foundation.props) as the exclusion signal instead — any app referencing the Foundation component package is framework- dependent by definition and should not default to SelfContained. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets index 2e8cf34c0d..13a5a9c3e5 100644 --- a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets @@ -6,8 +6,10 @@ --> - - + + true <_WindowsAppSDKSelfContainedSetByDefault>true From 70e2474c1a8b3e01188109f8600cafdecd1cf612 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 26 Mar 2026 10:18:47 -0400 Subject: [PATCH 34/41] Update Base dependency to 2.0.260326000-experimental Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2de847fc0c..d83a1d89ee 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - + https://github.com/microsoft/WindowsAppSDK - 27785440b9aa8f0af904d52aeb9ffff32dd72901 + 872f5978a9dbccba71aafd3fb76de13cc91262c3 https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP From 2171d5d8bdea577176bb621a64a2bd17b5786974 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 26 Mar 2026 13:00:02 -0400 Subject: [PATCH 35/41] Generate WindowsAppSDK-VersionInfo.h in Base package staging MddBootstrapAutoInitializer.cpp includes WindowsAppSDK-VersionInfo.h which provides version constants for the auto-initialization code. This header was previously generated by the aggregator's CreateBuildInfo.ps1 and included in the aggregator NuGet package. Now that the auto-initializer lives in the Base package (built by the Foundation pipeline), the header must be generated during Base package staging from ComponentPackageVersion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 3b8af7f03e..2ad8456f10 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -613,6 +613,61 @@ Try { Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp" -destination "$BasePackagePath\include" -force Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cs" -destination "$BasePackagePath\include" -force + # Generate WindowsAppSDK-VersionInfo.h for the Base package + # Parse version from ComponentPackageVersion (e.g., "2.0.260326000-experimental") + $versionParts = $ComponentPackageVersion -split '-' + $numericParts = $versionParts[0] -split '\.' + $vi_major = [int]$numericParts[0] + $vi_minor = [int]$numericParts[1] + $vi_patch = [int]$numericParts[2] + $vi_channel = if ($versionParts.Length -gt 1) { $versionParts[1] } else { "" } + $vi_tag = $vi_channel + $vi_majorminor = ($vi_major -shl 16) -bor $vi_minor + $vi_majorminor_hex = "{0:X8}" -f $vi_majorminor + $vi_version_uint64 = [uint64]$vi_major -shl 48 -bor [uint64]$vi_minor -shl 32 -bor [uint64]$vi_patch -shl 16 + $vi_version_uint64_hex = "{0:X16}" -f $vi_version_uint64 + $versionInfoHeader = @" +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +// +// DO NOT MODIFY. Generated by BuildAll.ps1 StageBaseFiles step. +// + +#ifndef _WINDOWSAPPSDK_VERSIONINFO_H__ +#define _WINDOWSAPPSDK_VERSIONINFO_H__ + +#define WINDOWSAPPSDK_RELEASE_MAJOR ${vi_major}u +#define WINDOWSAPPSDK_RELEASE_MINOR ${vi_minor}u +#define WINDOWSAPPSDK_RELEASE_PATCH ${vi_patch}u +#define WINDOWSAPPSDK_RELEASE_MAJORMINOR 0x${vi_majorminor_hex}u +#define WINDOWSAPPSDK_RELEASE_CHANNEL "${vi_channel}" +#define WINDOWSAPPSDK_RELEASE_CHANNEL_W L"${vi_channel}" +#define WINDOWSAPPSDK_RELEASE_TAG "${vi_tag}" +#define WINDOWSAPPSDK_RELEASE_TAG_W L"${vi_tag}" + +#define WINDOWSAPPSDK_RUNTIME_VERSION_UINT64 0x${vi_version_uint64_hex}ui64 + +#ifdef __cplusplus +#if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)) +namespace Microsoft::WindowsAppSDK +{ + constexpr uint16_t Release_Major{ ${vi_major} }; + constexpr uint16_t Release_Minor{ ${vi_minor} }; + constexpr uint16_t Release_Patch{ ${vi_patch} }; + constexpr uint32_t Release_MajorMinor{ 0x${vi_majorminor_hex} }; + constexpr PCWSTR Release_Channel{ L"${vi_channel}" }; + constexpr PCWSTR Release_Tag{ L"${vi_tag}" }; + constexpr uint64_t Runtime_Version_UInt64{ 0x${vi_version_uint64_hex} }; +} +#endif // __cplusplus >= 201703L || _MSVC_LANG >= 201703L +#endif // __cplusplus + +#endif // _WINDOWSAPPSDK_VERSIONINFO_H__ +"@ + $versionInfoHeader | Out-File -Encoding UTF8 -FilePath "$BasePackagePath\include\WindowsAppSDK-VersionInfo.h" + Write-Host "Generated WindowsAppSDK-VersionInfo.h (Major=$vi_major, Minor=$vi_minor, Patch=$vi_patch, Channel=$vi_channel)" + # Stage Bootstrap binaries per-platform (from build output) foreach($configurationToRun in $configuration.Split(",")) { From 6610fa0d251db1c2f7fabea5696d8f1b8c835c7b Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 26 Mar 2026 16:18:56 -0400 Subject: [PATCH 36/41] Update Base dependency to 2.0.260326001-experimental Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d83a1d89ee..ed6ad5b1c8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - + https://github.com/microsoft/WindowsAppSDK - 872f5978a9dbccba71aafd3fb76de13cc91262c3 + 2171d5d8bdea577176bb621a64a2bd17b5786974 https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP From 939f4ab2e1955ff38f68503759c217be115fea3f Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 27 Mar 2026 16:00:44 -0400 Subject: [PATCH 37/41] Fix WindowsAppSDK-VersionInfo.h: add missing macros and fix narrowing - Add WINDOWSAPPSDK_RELEASE_VERSION_TAG_W (was TAG_W, missing VERSION_ prefix) - Add VERSION_SHORTTAG, FORMATTED_VERSION_TAG, FORMATTED_VERSION_SHORTTAG macros - Fix C2397 narrowing: use static_cast for constexpr uint16_t values - Change Release_Patch from uint16_t to uint32_t (patch can exceed 65535) - Match macro names from aggregator's CreateBuildInfo.ps1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 2ad8456f10..1e8b6c53e2 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -622,6 +622,9 @@ Try { $vi_patch = [int]$numericParts[2] $vi_channel = if ($versionParts.Length -gt 1) { $versionParts[1] } else { "" } $vi_tag = $vi_channel + $vi_shorttag = if ($vi_tag.Length -gt 0) { $vi_tag.Substring(0,1) + ($vi_tag -replace '[^0-9]','') } else { "" } + $vi_formatted_tag = if ($vi_tag.Length -gt 0) { "-$vi_tag" } else { "" } + $vi_formatted_shorttag = if ($vi_shorttag.Length -gt 0) { "-$vi_shorttag" } else { "" } $vi_majorminor = ($vi_major -shl 16) -bor $vi_minor $vi_majorminor_hex = "{0:X8}" -f $vi_majorminor $vi_version_uint64 = [uint64]$vi_major -shl 48 -bor [uint64]$vi_minor -shl 32 -bor [uint64]$vi_patch -shl 16 @@ -637,28 +640,37 @@ Try { #ifndef _WINDOWSAPPSDK_VERSIONINFO_H__ #define _WINDOWSAPPSDK_VERSIONINFO_H__ -#define WINDOWSAPPSDK_RELEASE_MAJOR ${vi_major}u -#define WINDOWSAPPSDK_RELEASE_MINOR ${vi_minor}u -#define WINDOWSAPPSDK_RELEASE_PATCH ${vi_patch}u -#define WINDOWSAPPSDK_RELEASE_MAJORMINOR 0x${vi_majorminor_hex}u -#define WINDOWSAPPSDK_RELEASE_CHANNEL "${vi_channel}" -#define WINDOWSAPPSDK_RELEASE_CHANNEL_W L"${vi_channel}" -#define WINDOWSAPPSDK_RELEASE_TAG "${vi_tag}" -#define WINDOWSAPPSDK_RELEASE_TAG_W L"${vi_tag}" - -#define WINDOWSAPPSDK_RUNTIME_VERSION_UINT64 0x${vi_version_uint64_hex}ui64 +#define WINDOWSAPPSDK_RELEASE_MAJOR ${vi_major}u +#define WINDOWSAPPSDK_RELEASE_MINOR ${vi_minor}u +#define WINDOWSAPPSDK_RELEASE_PATCH ${vi_patch}u +#define WINDOWSAPPSDK_RELEASE_MAJORMINOR 0x${vi_majorminor_hex}u +#define WINDOWSAPPSDK_RELEASE_CHANNEL "${vi_channel}" +#define WINDOWSAPPSDK_RELEASE_CHANNEL_W L"${vi_channel}" +#define WINDOWSAPPSDK_RELEASE_VERSION_TAG "${vi_tag}" +#define WINDOWSAPPSDK_RELEASE_VERSION_TAG_W L"${vi_tag}" +#define WINDOWSAPPSDK_RELEASE_VERSION_SHORTTAG "${vi_shorttag}" +#define WINDOWSAPPSDK_RELEASE_VERSION_SHORTTAG_W L"${vi_shorttag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_TAG "${vi_formatted_tag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_TAG_W L"${vi_formatted_tag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_SHORTTAG "${vi_formatted_shorttag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_SHORTTAG_W L"${vi_formatted_shorttag}" + +#define WINDOWSAPPSDK_RUNTIME_VERSION_UINT64 0x${vi_version_uint64_hex}ui64 #ifdef __cplusplus #if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)) namespace Microsoft::WindowsAppSDK { - constexpr uint16_t Release_Major{ ${vi_major} }; - constexpr uint16_t Release_Minor{ ${vi_minor} }; - constexpr uint16_t Release_Patch{ ${vi_patch} }; - constexpr uint32_t Release_MajorMinor{ 0x${vi_majorminor_hex} }; + constexpr uint16_t Release_Major{ static_cast(${vi_major}) }; + constexpr uint16_t Release_Minor{ static_cast(${vi_minor}) }; + constexpr uint32_t Release_Patch{ ${vi_patch}u }; + constexpr uint32_t Release_MajorMinor{ 0x${vi_majorminor_hex}u }; constexpr PCWSTR Release_Channel{ L"${vi_channel}" }; - constexpr PCWSTR Release_Tag{ L"${vi_tag}" }; - constexpr uint64_t Runtime_Version_UInt64{ 0x${vi_version_uint64_hex} }; + constexpr PCWSTR Release_VersionTag{ L"${vi_tag}" }; + constexpr PCWSTR Release_VersionShortTag{ L"${vi_shorttag}" }; + constexpr PCWSTR Release_FormattedVersionTag{ L"${vi_formatted_tag}" }; + constexpr PCWSTR Release_FormattedVersionShortTag{ L"${vi_formatted_shorttag}" }; + constexpr uint64_t Runtime_Version_UInt64{ 0x${vi_version_uint64_hex}ui64 }; } #endif // __cplusplus >= 201703L || _MSVC_LANG >= 201703L #endif // __cplusplus From 225279474d237077150957cc8a9dc1551d96d21a Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Sat, 28 Mar 2026 10:40:34 -0400 Subject: [PATCH 38/41] Update Base dependency to 2.0.260327000-experimental Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ed6ad5b1c8..6622806494 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - + https://github.com/microsoft/WindowsAppSDK - 2171d5d8bdea577176bb621a64a2bd17b5786974 + 939f4ab2e1955ff38f68503759c217be115fea3f https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP From 6eea93bb2f835c3312923411a75c1ca9bd9b2259 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Sat, 28 Mar 2026 17:16:53 -0400 Subject: [PATCH 39/41] Generate WindowsAppSDK-VersionInfo.cs and fix include condition The C# auto-initializer (MddBootstrapAutoInitializer.cs) references Microsoft.WindowsAppSDK.Release and Microsoft.WindowsAppSDK.Runtime.Version which are defined in WindowsAppSDK-VersionInfo.cs. This file was only generated by the aggregator's CreateBuildInfo.ps1 and only included when WindowsAppSDKAggregatePackage=true. Fix: Generate the .cs file alongside the .h in StageBaseFiles, and remove the WindowsAppSDKAggregatePackage condition so it's included whenever WindowsAppSdkIncludeVersionInfo=true (set by Bootstrap.CS.targets). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildAll.ps1 | 47 +++++++++++++++++++ .../Microsoft.WindowsAppSDK.Base.targets | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 1e8b6c53e2..f7fdfddd78 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -680,6 +680,53 @@ namespace Microsoft::WindowsAppSDK $versionInfoHeader | Out-File -Encoding UTF8 -FilePath "$BasePackagePath\include\WindowsAppSDK-VersionInfo.h" Write-Host "Generated WindowsAppSDK-VersionInfo.h (Major=$vi_major, Minor=$vi_minor, Patch=$vi_patch, Channel=$vi_channel)" + # Generate WindowsAppSDK-VersionInfo.cs for the Base package (used by C# auto-initializer) + $versionInfoCs = @" +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +// +// DO NOT MODIFY. Generated by BuildAll.ps1 StageBaseFiles step. +// + +namespace Microsoft.WindowsAppSDK +{ + // Release information + internal class Release + { + internal const ushort Major = ${vi_major}; + internal const ushort Minor = ${vi_minor}; + internal const uint MajorMinor = 0x${vi_majorminor_hex}; + internal const string Channel = "${vi_channel}"; + internal const string VersionTag = "${vi_tag}"; + internal const string VersionShortTag = "${vi_shorttag}"; + internal const string FormattedVersionTag = "${vi_formatted_tag}"; + internal const string FormattedVersionShortTag = "${vi_formatted_shorttag}"; + } + + namespace Runtime + { + internal class Identity + { + internal const string Publisher = "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"; + internal const string PublisherId = "8wekyb3d8bbwe"; + } + + internal class Version + { + internal const ushort Major = ${vi_major}; + internal const ushort Minor = ${vi_minor}; + internal const ushort Build = 0; + internal const ushort Revision = 0; + internal const ulong UInt64 = 0x${vi_version_uint64_hex}; + internal const string DotQuadString = "${vi_major}.${vi_minor}.0.0"; + } + } +} +"@ + $versionInfoCs | Out-File -Encoding UTF8 -FilePath "$BasePackagePath\include\WindowsAppSDK-VersionInfo.cs" + Write-Host "Generated WindowsAppSDK-VersionInfo.cs" + # Stage Bootstrap binaries per-platform (from build output) foreach($configurationToRun in $configuration.Split(",")) { diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets index dc088eeb3a..15058876c5 100644 --- a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets @@ -38,7 +38,7 @@ - + - - + + true <_WindowsAppSDKSelfContainedSetByDefault>true @@ -24,18 +22,8 @@ - - + +