Я написал приложение для консоли для .net 4.7.2, и я использовал microsoft.toolkit.uwp.notifications для создания уведомления. либо уволен, либо перейдите в центр уведомлений. .exe Когда уведомление нажимается?using Microsoft.Toolkit.Uwp.Notifications;
using System;
using Windows.Foundation.Collections;
using Windows.UI.Xaml.Controls;
namespace ToastTest
{
class Program
{
static void Main(string[] args)
{
// The ToastContentBuilder simplifies creating the notification.
// This works in .NET Framework just like it did in .NET 8.
new ToastContentBuilder()
.AddText("Success on .NET Framework!")
.AddText("This notification was sent using the Windows Community Toolkit.")
.Show(); // The .Show() method handles the complex registration for you.
// Console.WriteLine("Toast notification sent from .NET Framework! Check the Action Center.");
// Console.ReadKey();
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... tification