-
Notifications
You must be signed in to change notification settings - Fork 370
What would cause WinRT.ActivationFactory
to be null long after Desktop WinUI3 app has been running?
#3116
Replies: 1 comment · 4 replies
-
@sharpninja Can you comment on what is the exception / error you are seeing? Looking at the above stack, it looks like the native call to get the activation factory hasn't happened yet. It is on this line calling |
Beta Was this translation helpful? Give feedback.
All reactions
-
Letting the code run past the break point ends with this error:
Call stack
Local Variables
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Letting the app continue from this error, it does eventually start and when it attempts to add a TextBox to a Panel, an error (HR -2147467259) is sent to
So it is failing at
After that it goes into the error handling code. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I have more findings to post, but a brief summary is that without loading the XAML from App.xaml, the |
Beta Was this translation helpful? Give feedback.
All reactions
-
these two threads are related. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
An error is occurring when instantiating a
TextBox
. Placing a breakpoint inThrowExceptionForHR
allows me to capture the below stack. Also, when setting the context to this frameI can see in the locals window these variables:
To my eye, this looks like
_ActivationFactory
isnull
. I am causing this somehow. I am using this library sharpninja/WindowsAppSdkHost to host my application. I don't know what I've neglected in initialization to cause this. My Program.cs looks like this:Any help would be appreciated!
Packages in use
Project properties
Also, I am not using an
App.xaml
file. MyApplication
is defined as such.Full Stack
Beta Was this translation helpful? Give feedback.
All reactions