-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add Win32 desktop toasts helper code #2793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Think we had a separate thread somewhere; so wanted to capture it here, we want to make sure these work well with .NET Core 3.0 apps too. |
|
We should also have a sample somewhere and a docs PR. |
|
@michael-hawker sample is here: https://github.com/WindowsNotifications/desktop-toasts Docs are here: https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop Both haven't been updated yet since the NuGet package isn't published yet (but I'll update them once it is) |
Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj
Show resolved
Hide resolved
michael-hawker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewleader merging this in, but QQ. Will this work with .NET Core or do we have to add targets for that?
|
I think someone else (kbrons?) worked on ensuring .NET Core 3 support? I don't know personally |
|
@nmetulev do you remember? @andrewleader thanks for the quick response, let us know when you get the other doc repo going. |
|
@andrewleader talked to Nikola, we didn't look at .NET Core 3 support initially. Would you have time to look at that in the next couple of weeks? At least just to test and let us know if it works or not? |
| </ItemGroup> | ||
|
|
||
|
|
||
| <ItemGroup Condition="!('$(TargetFramework)'=='net461')"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm it indeed doesn't work on .NET Core 3.0 WPF apps, I think because of this line which excludes the DesktopNotificationManager code on everything except .NET Framework apps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DesktopNotificationManager code also incorrectly gets included in ASP.NET Framework projects (when it should only be included in desktop WPF/console/client apps).
@michael-hawker is there any targeting we can do (on NuGet or in the compiled project) to only include the DesktopNotificationManager code for WPF (.NET Framework / .NET Core) and desktop apps, and NOT ASP.NET web projects?
Or do we simply need a separate NuGet package, Microsoft.Toolkit.Uwp.Notifications.Desktop? Separate package is okay with me, but it'd be neat if we could do it all in one and have it magically light up differently in all these different places
Issue: #
PR Type
What kind of change does this PR introduce?
Feature
What is the current behavior?
N/A
What is the new behavior?
Win32 desktop C# devs can install the notifications library to help facilitate sending toast notifications from non-UWP apps.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information