Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pinning widget after deploy rise NullReferenceException

Open
#322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
desktop

Research direction

Start in Samples/Widgets/cs-console-packaged/CsConsoleWidgetProvider/WidgetProvider.cs, especially the referenced lines 28 and 151. Reproduce by pinning the widget after the first deploy, inspect the null exception and the subsequent “Activate called for unknown” error, and verify the behavior without requiring two widget.exe process terminations.

Written by the indexing model from the issue text.

Description

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.

Dominant language
PowerShell
Stars
1k
Forks
336
Avg merge
7h 13m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/WindowsAppSDK-Samples

All issues in microsoft/WindowsAppSDK-Samples

Similar issues

More Desktop Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.