无法在 WPF 应用程序中安装 Microsoft.Toolkit.Uwp NuGet 包
Can't install Microsoft.Toolkit.Uwp NuGet package in WPF app
我正在尝试将 Microsoft.Toolkit.Uwp NuGet 包安装到 WPF 应用程序中(需要 toast 通知,可能还需要来自 UWP 的更多内容),但我总是收到以下错误,不无论我尝试安装哪个版本的工具包,也无论我的目标是哪个 .NET 版本:
Could not install package 'Microsoft.Toolkit.Uwp XXX'. You are trying to install this package into a project that targets '.NETFramework,Version=ZZZ', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
奇怪的是,Microsoft 实际上将您发送到 Toolkit 来执行我正在尝试的事情:从 WPF 应用程序获取 toast 通知,如下所示:
https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop
Excerpt from Microsoft's website
尝试下载 NuGet 包并从本地源安装,尝试下载整个 GitHub 项目,但无济于事。伙计们,我在这里做错了什么?我似乎无法弄清楚。
P.S: 我不能直接使用 UWP,因为这将是一个公司内部应用,需要做很多 UWP 不支持的事情。
documentation tells you to download the Notifications library. The Microsoft.Toolkit.Uwp
package is not compatible with WPF but the Microsoft.Toolkit.Uwp.Notifications 包是。
我正在尝试将 Microsoft.Toolkit.Uwp NuGet 包安装到 WPF 应用程序中(需要 toast 通知,可能还需要来自 UWP 的更多内容),但我总是收到以下错误,不无论我尝试安装哪个版本的工具包,也无论我的目标是哪个 .NET 版本:
Could not install package 'Microsoft.Toolkit.Uwp XXX'. You are trying to install this package into a project that targets '.NETFramework,Version=ZZZ', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
奇怪的是,Microsoft 实际上将您发送到 Toolkit 来执行我正在尝试的事情:从 WPF 应用程序获取 toast 通知,如下所示: https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop
Excerpt from Microsoft's website
尝试下载 NuGet 包并从本地源安装,尝试下载整个 GitHub 项目,但无济于事。伙计们,我在这里做错了什么?我似乎无法弄清楚。
P.S: 我不能直接使用 UWP,因为这将是一个公司内部应用,需要做很多 UWP 不支持的事情。
documentation tells you to download the Notifications library. The Microsoft.Toolkit.Uwp
package is not compatible with WPF but the Microsoft.Toolkit.Uwp.Notifications 包是。