MicrosoftDocs / windows-dev-docs

Conceptual and overview content for developing Windows apps
Creative Commons Attribution 4.0 International
667 stars 1.18k forks source link

.net MAUI ToastActivatorCLSID #5031

Closed flaubertagufonku closed 1 week ago

flaubertagufonku commented 2 weeks ago

Type of issue

Typo

Feedback

For WINUI .net maui applications It is impossible to make toast notification work if the appmanifest of the Windows platforms does not have the recommended configuration to identify the application. It is well described in the following link https://github.com/gurrenm3/Toast-Notifications-with-.Net-Maui?tab=readme-ov-file

In the description, it is recommended to change the ApplicationGUID with your own ID. I checked a lot of documentation, but none of them described exactly how to create a valid GUID. I tried to personnalize it in the MAUI .csproj under Property => Maui shared => General => Application ID (GUID) by creating a specific keychain. Then I tried to copy paste this keychain into the package.appmanifest but the key is not recognized.

Is there a valid method to create an ApplicationGUID? If not, how do we get a valid GUID for the app manifest?

Page URL

https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/send-local-toast?tabs=uwp

Content source URL

https://github.com/MicrosoftDocs/windows-dev-docs/blob/docs/hub/apps/design/shell/tiles-and-notifications/send-local-toast.md

Author

@jwmsft

Document Id

0efae90c-e517-b54d-8e81-ebbd69d2270d

drewbatgit commented 1 week ago

@flaubertagufonku Hello, I'm sorry you are having trouble getting this scenario to work. I took a look at it and noticed that the example you have found declares the GUID in the project file: https://github.com/gurrenm3/Toast-Notifications-with-.Net-Maui/blob/master/ToastNotificationDemo.Maui/ToastNotificationDemo.Maui.csproj

This uses a different format to declare the GUID than when you add it using the project Property pages. It may be that the syntax of the manifest has changed since the example in the repo was created. Unfortunately, since this sample isn't Microsoft content and this scenario isn't officially supported in the Microsoft documentation, I can't help you debug this issue. I would suggest reaching out to the repo owner for the sample to see if they can help you and/or update their examples. You might also want to post this issue at Microsoft Q&A, which is where we direct developers for support that isn't directly related to our official documentation.

I'm going to close this issue, but feel free to continue to comment on the closed issue, especially if you find something in the official Microsoft documentation that needs to be updated or corrected.

flaubertagufonku commented 1 week ago

@drewbatgit thank you for your answer. I will try those ways and may be find an answer through them.