Automate activatable classes instead of manually creating manifest file
Open
@manodasanW is already working on this.
Since Apr 5, 2021.
authoring
enhancement
- Dominant language
- C#
- Stars
- 665
- Forks
- 134
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 32
Description
Summary
Having to declare activatable classes in the consuming app is a pain! There should be a way around it. When I create a new WinUI 3 C++ app and try to use a C# CsWinRT NuGet package, I have to declare all of the activatable classes before using them.
<file name="WinRT.Host.dll">
<activatableClass
name="ClassLibrary1.Class1"
threadingModel="both"
xmlns="urn:schemas-microsoft-com:winrt.v1" />
...
</file>
Otherwise, I get the Class not registered exceptions.
Exception thrown at 0x75E6E7A2 (KernelBase.dll) in App28.exe: WinRT originate error - 0x80040154 : 'Class not registered'.
Exception thrown at 0x75E6E7A2 in App28.exe: Microsoft C++ exception: winrt::hresult_class_not_registered at memory location 0x010FC38C.
Exception thrown at 0x75E6E7A2 in App28.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
There at least should be a way for a NuGet package author to include these class registrations so that consuming apps don't have to!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.