You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
SystemInformation helper throws an exception with Unpackaged Windows App SDK projects #4356
WinUI 💠Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.bug 🐛An unexpected issue that highlights incorrect behaviorhelp wantedIssues identified as good community contribution opportunities
Upon using the SystemInformation class, the following exception is thrown in unpackaged Windows App SDK projects:
Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:
Steps to Reproduce
Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)
SystemInformation.Instance doesn't fail and provides a subset of the values that are available without a package identity, or if not possible, throws a more friendly exception.
Thanks @gus33000 we haven't checked unpackaged support yet with the Toolkit. Not sure if there's an alternative method we can call to get the app name in unpackaged scenarios?
Thanks @gus33000 we haven't checked unpackaged support yet with the Toolkit. Not sure if there's an alternative method we can call to get the app name in unpackaged scenarios?
The only way I think that is standardized of setting an application name without a package probably would be AssemblyInfo for .NET apps. We could get the package version name copyright and more using this.
I was wondering if it would not be a good idea to make a Package like class but for unpacked apps as some sort of shim. UWP apps and Unpackaged apps would use this class to get the same info but different methods behind the scenes would be applied to get different properties.
Same idea could be applied to make an ApplicationData shim?
Update:
Some of the SystemInformation class functionality is dependent on ApplicationDataStorageHelper, which also doesn't support unpackaged scenarios (no Application Data without Package identity).
Will need to address both for proper functionality in WinUI3 unpackaged apps.
WinUI 💠Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.bug 🐛An unexpected issue that highlights incorrect behaviorhelp wantedIssues identified as good community contribution opportunities
Activity
gus33000 commentedon Oct 31, 2021
The issue seems to be caused by the following call which will fail under applications with no package identity:
WindowsCommunityToolkit/CommunityToolkit.WinUI/Helpers/SystemInformation.cs
Line 41 in 07fa14d
I don't think the other fields would actually fail in the same way with no package identity available.
michael-hawker commentedon Nov 9, 2021
Thanks @gus33000 we haven't checked unpackaged support yet with the Toolkit. Not sure if there's an alternative method we can call to get the app name in unpackaged scenarios?
gus33000 commentedon Nov 12, 2021
The only way I think that is standardized of setting an application name without a package probably would be AssemblyInfo for .NET apps. We could get the package version name copyright and more using this.
I was wondering if it would not be a good idea to make a Package like class but for unpacked apps as some sort of shim. UWP apps and Unpackaged apps would use this class to get the same info but different methods behind the scenes would be applied to get different properties.
Same idea could be applied to make an ApplicationData shim?
zateutsch commentedon Dec 13, 2021
Update:
Some of the SystemInformation class functionality is dependent on ApplicationDataStorageHelper, which also doesn't support unpackaged scenarios (no Application Data without Package identity).
Will need to address both for proper functionality in WinUI3 unpackaged apps.