Skip to content

Migrate runtime bootstrap and initialization support from Foundation to Base#6293

Draft
Scottj1s wants to merge 14 commits intomainfrom
user/sjones/remove-bootstrap-from-foundation
Draft

Migrate runtime bootstrap and initialization support from Foundation to Base#6293
Scottj1s wants to merge 14 commits intomainfrom
user/sjones/remove-bootstrap-from-foundation

Conversation

@Scottj1s
Copy link
Member

This work enables other component packages to streamline their dependencies, omitting building and packaging of any WinAppSDK APIs unless explicitly referenced. For example the WinML package can change its transitive reference on Foundation (and indirectly, IXP) to just Base to pick up auto-init support and avoid binplacing DLLs it doesn't require at runtime, in self-contained mode.

Scottj1s and others added 13 commits March 12, 2026 15:46
- 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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- name: use  from CommonVariables (not )
- DetermineNugetPackageVersion: use  instead of

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…kage

- 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>
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>
- 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>
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>
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>
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>
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>
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>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant