microsoft / WindowsAppSDK-Samples

Feature samples for the Windows App SDK
MIT License
721 stars 225 forks source link

Pinning widget after deploy rise NullReferenceException #322

Open steam3d opened 9 months ago

steam3d commented 9 months ago

After first deploy, try to pin the widget. The console app will open and rise null exception in this line: https://github.com/microsoft/WindowsAppSDK-Samples/blob/3de5dd96cacf89cc29b3f4f5d982ec8cc58711ff/Samples/Widgets/cs-console-packaged/CsConsoleWidgetProvider/WidgetProvider.cs#L28

then will be called Activate method and trow error Activate called for unknown: https://github.com/microsoft/WindowsAppSDK-Samples/blob/3de5dd96cacf89cc29b3f4f5d982ec8cc58711ff/Samples/Widgets/cs-console-packaged/CsConsoleWidgetProvider/WidgetProvider.cs#L151

After killing widget.exe process two times (Exactly twice, once is not enough) the error always goes away.