[英]How to create notification in console app in .NET Framework?
How do I send a notification to Windows 10 via just a console app and nothing else.如何仅通过控制台应用程序向 Windows 10 发送通知,仅此而已。 I am trying to do this with .NET Framework.
我正在尝试使用 .NET 框架来做到这一点。 I tried using this answer but when I tried to reference Windows from Windows > Core, there was no such option.
我尝试使用这个答案,但是当我尝试从 Windows > Core 引用 Windows 时,没有这样的选项。
There seems to be a Nuget Package available that provides all the necessary windows references似乎有可用的 Nuget Package 提供所有必要的 windows 参考
Microsoft.Windows.SDK.Contracts.
Microsoft.Windows.SDK.Contracts。
Once you have installed it you should be able to reference the namespace and add any notification related code安装后,您应该能够引用命名空间并添加任何与通知相关的代码
using Windows.UI.Notifications;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.