CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.86k stars 1.38k forks source link

Microsoft.Toolkit.Uwp.UI.Controls.Core/Resources ResourceMap Not Found #4931

Open Manohar-Gunturu opened 1 year ago

Manohar-Gunturu commented 1 year ago

Line throwing the error 'ResourceMap Not Found': https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/2d608fdb831380fb2827ec18d24efa59c9ff0ef2/Microsoft.Toolkit.Uwp.UI.Controls.Core/InAppNotification/InAppNotification.cs#L70

We have defined our own InAppNotificationAlias.Template and this line has been crashing the app on Win10. Is our app supposed to access Microsoft.Toolkit.Uwp.UI.Controls.Core/Resources, or do we need to define the WCT_InAppNotification_DismissButton_AutomationName string in the app's resource file?

ghost commented 1 year ago

Hello Manohar-Gunturu, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

michael-hawker commented 1 year ago

This is defined by the Core package itself here:

https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/2d608fdb831380fb2827ec18d24efa59c9ff0ef2/Microsoft.Toolkit.Uwp.UI.Controls.Core/Strings/en-US/Resources.resw#L136-L139

There shouldn't be a reason for it not to be found. Unless if you custom template doesn't have a dismiss button maybe? Otherwise, you should be able to define the full resource string in your app.

In either case, InAppNotification won't ship in the upcoming 8.0 release. It's been replaced with the StackedNotificationsBehavior on top of WinUI's InfoBar control. So, I'd recommend that approach moving forward with the incoming 8.0 release.