Skip to content

fix(packaging): register WinUIEditor activatable classes in MSIX mani…#79

Merged
zhuowcui merged 1 commit into
mainfrom
fix/winuieditor-msix-manifest
May 8, 2026
Merged

fix(packaging): register WinUIEditor activatable classes in MSIX mani…#79
zhuowcui merged 1 commit into
mainfrom
fix/winuieditor-msix-manifest

Conversation

@zhuowcui

@zhuowcui zhuowcui commented May 8, 2026

Copy link
Copy Markdown
Collaborator

…fest

WinUIEdit's targets live in build\native, which NuGet does not import for managed .NET projects, so the MSIX tooling never generated the required entries for WinUIEditor.dll.

Without those entries the OS cannot locate WinUIEditor's activation factory at runtime, causing a STATUS_STOWED_EXCEPTION (0xC000027B) crash inside Microsoft.UI.Xaml.dll on first launch — exactly the failure seen in the Microsoft Partner Center certification report.

Fix: add an explicit item pointing at the native WinMD from the WinUIEdit NuGet package. The MSIX tooling's _AddWindowsMetadataReferecesToPackagingOutputs target picks this up and passes it to WinAppSdkGenerateAppxManifest, which harvests all WinRT activatable class IDs (CodeEditorControl, EditorBaseControl, XamlMetaDataProvider) from the WinMD and writes them into the generated AppxManifest.xml.

Also add TrimmerRootAssembly directives for WinUIEditorCsWinRT (net8.0) and CommunityToolkit.WinUI.UI.Controls.DataGrid (net5.0) so the AOT/IL trimmer does not strip types that WinUI resolves dynamically through XamlTypeInfo.

…fest

WinUIEdit's targets live in build\native\, which NuGet does not import for
managed .NET projects, so the MSIX tooling never generated the required
<Extension Category='windows.activatableClass.inProcessServer'> entries for
WinUIEditor.dll.

Without those entries the OS cannot locate WinUIEditor's activation factory at
runtime, causing a STATUS_STOWED_EXCEPTION (0xC000027B) crash inside
Microsoft.UI.Xaml.dll on first launch — exactly the failure seen in the
Microsoft Partner Center certification report.

Fix: add an explicit <WindowsMetadataReference> item pointing at the native
WinMD from the WinUIEdit NuGet package.  The MSIX tooling's
_AddWindowsMetadataReferecesToPackagingOutputs target picks this up and
passes it to WinAppSdkGenerateAppxManifest, which harvests all WinRT
activatable class IDs (CodeEditorControl, EditorBaseControl,
XamlMetaDataProvider) from the WinMD and writes them into the generated
AppxManifest.xml.

Also add TrimmerRootAssembly directives for WinUIEditorCsWinRT (net8.0) and
CommunityToolkit.WinUI.UI.Controls.DataGrid (net5.0) so the AOT/IL trimmer
does not strip types that WinUI resolves dynamically through XamlTypeInfo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@zhuowcui zhuowcui merged commit f62b34a into main May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants