After we upgraded Windows App SDK to 1.6, Dev Files Preview on Peek has been broken on ARM64.
For .86, we've added WebView2 to Registry Preview in order to have Monaco Editor as the text editor, which is also broken on ARM64.
After a lengthy investigation, it seems we've found the core issue, PowerToys has been shipping with a x64 Microsoft.Web.WebView2.Core.dll in the ARM64 installer, which fails at runtime.
We seem to have hit a version of https://github.com/microsoft/WindowsAppSDK/issues/4826
When we build PowerToys in Dart for release, we publish some of the C# WinUI3Apps after building PowerToys and before signing / building the install. This means that the WindowsAppSDK build will recopy its WebView2 dependency, which for some reason is ARM64. On local builds of PowerToys, PowerRename, a C++ WinAppSDK application finished last, which copies the right dll and it's the reason we weren't being able to repro the issue on local builds of ARM64 PowerToys.
This PR solves the issue by including a short time hack in the CI to copy the right dll after publishing the C# WinUI3Apps when building for ARM64.
## Validation Steps Performed
Waiting for 4 concurrent builds of ARM64 from Dart to test whether the problem is solved.
XAML style checkers aren't running right now in PR CI. This allowed some XAML style errors to cause build errors in release CI.
This PR contains the following fixes:
- Fix XAML style of files that have slipped.
- Add errors to the scripts that depend on dotnet commands if it fails.
- Add .NET 6 on CI so that applyXamlStyling.ps1 and verifyNugetPackages.ps1 run correctly again.
-t:Pack is insufficient for packing a NuGet package after you've signed the DLLs.
Without -p:NoBuild=true, sometimes it will rebuild (or re-link) them for you.
This pull request rewrites the entire Azure DevOps build system.
The guiding principles behind this rewrite are:
- No pipeline definitions should contain steps (or tasks) directly.
- All jobs should be in template files.
- Any set of steps that is reused across multiple jobs must be in
template files.
- All artifact names can be customized (via a property called
`artifactStem` on all templates that produce or consume artifacts).
- No compilation happens outside of the "Build" phase, to consolidate
the production and indexing of PDBs.
- All step and job templates are named with `step` or `job` _first_,
which disambiguates them in the templates directory.
- Most jobs can be run on different `pool`s, so that we can put
expensive jobs on expensive build agents and cheap jobs on cheap
build agents. Some jobs handle pool selection on their own, however.
Our original build pipelines used the `VSBuild` task _all over the
place._ This resulted in PowerToys being built in myriad ways, different
for every pipeline. There was an attempt at standardization early on,
where `ci.yml` consumed jobs and steps templates... but when
`release.yml` was added, all of that went out the window.
It's the same story as Terminal (https://github.com/microsoft/terminal/pull/15808).
The new pipelines are consistent and focus on a small, well-defined set
of jobs:
- `job-build-project`
- This is the big one!
- Takes a list of build configurations and platforms.
- Produces an artifact named `build-PLATFORM-CONFIG` for the entire
matrix of possibilities.
- Builds all of the installers.
- Optionally signs the output (all of the output).
- Admittedly has a lot going on.
- `job-test-project`
- Takes **one** build config and **one** platform.
- Consumes `build-PLATFORM-CONFIG`
- Selects its own pools (hardcoded) because it knows about
architectures and must choose the right agent arch.
- Runs tests (directly on the build agent).
- `job-publish-symbols-using-symbolrequestprod-api`
- Consumes `**/*.pdb` from all prior build phases.
- Uploads all PDBs in one artifact to Azure DevOps
- Uses Microsoft's internal symbol publication REST API to submit
stripped symbols to MSDL for public consumption.
Finally, this pull request has some additional benefits:
- Symbols are published to the private and public feeds at the same
time, in the same step. They should be available in the public symbol
server for public folks to debug against!
- We have all the underpinnings necessary to run tests on ARM64 build
agents.
- Right now, `ScreenResolutionUtility` is broken
- I had to introduce a custom version of `UseDotNet` which would
install the right architecture (🤦); see https://github.com/microsoft/azure-pipelines-tasks/issues/20300.
- All dotnet and nuget versioning is consolidated into a small set of
step templates.
- This will provide a great place for us to handle versioning changes
later, since all versioning happens in one place.