dotnet build UnityExtension/UnityExtension.csproj -c Debug -p:Platform=x64
dotnet build UnityExtension/UnityExtension.csproj -c Release -p:Platform=x64For packaged MSIX output (restore first, build unsigned, sign afterwards), see "Package build" and "Signing" in PUBLISHING.md. A plain signed dotnet build ... -p:GenerateAppxPackageOnBuild=true fails with APPX0101 without a certificate thumbprint.
Trim / AOT notes:
IL2081/IL2104fromABI.Windows.Foundation.*,ABI.System.Collections.Generic.*,WinRT.Marshaler<...>— known CsWinRT / Windows SDK projection warnings.- Treated as non-fatal via
WarningsNotAsErrorsbut still appear in build output. - CsWinRT / Windows SDK projection noise suppressed by default for local publishes via
SuppressSdkNoise=true. - Use
-p:SuppressSdkNoise=falseto review full trim / AOT warning output. - Avoid broad linker suppression for release validation; verify package loads + runs in PowerToys.
UnityExtension.Tests (xunit) covers ProjectParser: dotnet test UnityExtension.Tests/UnityExtension.Tests.csproj -p:Platform=x64. UI and command behavior is still verified manually in PowerToys. After a rebuild, reload Command Palette or restart PowerToys.
Put breakpoints in:
- command provider initialization
GetItems- command invocation paths
- project parsing
- registry lookup
- process launch helpers
Watch VS Output window, use temp logging if needed.
- Keep
UnityExtension.cs+Package.appxmanifestaligned - CLSID must match in COM server + app extension registration
- Package identity (
Name,Publisher) must match Partner Center reserved values - Bundle builds need either
-p:AppxPackageSigningEnabled=false(then sign the bundle) or-p:PackageCertificateThumbprint=<thumb>;GenerateTemporaryStoreCertificatealone is not enough Properties/PublishProfiles/win-x64.pubxmlandwin-arm64.pubxmlmust stay in sync (e.g. both set or both omitPublishReadyToRun)- If
GenerateAppxPackageOnBuild=true, do not forceWindowsPackageType=None - Local deployment:
Add-AppxPackage -Registeragainst debugAppxManifest.xml - Prefer current Microsoft Learn packaging guidance over old repo scripts
NuGet first (affects compilation), then local tools, then pre-commit hooks. All package versions live in Directory.Packages.props.
dotnet package list --outdated --project UnityExtension/UnityExtension.csproj
dotnet package update <PackageId>@<version> --project UnityExtension/UnityExtension.csproj
dotnet tool update --local csharpier # --local is required, else the global manifest is updated
dotnet tool update --local minver-cli
dotnet tool restore
pre-commit autoupdate && pre-commit run --all-files # reject any hook rev downgradeRules:
- The extension runs inside PowerToys, so keep
Microsoft.CommandPalette.Extensions,Microsoft.WindowsAppSDK,Microsoft.Windows.CsWinRTandMicrosoft.Windows.SDK.BuildToolsat or below the versions in PowerToys'Directory.Packages.props. Do not use prerelease versions. Microsoft.WindowsAppSDKandMicrosoft.Windows.CsWinRTmust stay mutually compatible, or AOT/trim can break.Microsoft.CommandPalette.Extensionsis date-versioned; bump only when targeting a newer PowerToys release.- A new
Microsoft.Windows.SDK.BuildToolsbase (e.g.10.0.26100.xto10.0.27000.x) also needs thewindows10.0.NNNNN.0suffix ofTargetFrameworkinUnityExtension.csprojandMaxVersionTestedinPackage.appxmanifestupdated. LeaveMinVersionandIdentity Versionalone.
Validate after updates:
dotnet build UnityExtension/UnityExtension.csproj -c Debug -p:Platform=x64
dotnet build UnityExtension/UnityExtension.csproj -c Release -p:Platform=x64 -p:SuppressSdkNoise=false --no-incremental # when WindowsAppSDK or CsWinRT changed
dotnet tool run csharpier check .