Windows 8 从F送吐司#

Windows 8 从F送吐司#,windows-8,f#,windows-runtime,Windows 8,F#,Windows Runtime,我想从F#控制台应用程序发送一个Windows 8.1风格的ToastNotification 这是我的密码: let gotMessage message = let xdoc = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText03) let children = xdoc.ChildNodes children.[0 |> uint32].AppendChild(xd

我想从F#控制台应用程序发送一个Windows 8.1风格的
ToastNotification

这是我的密码:

let gotMessage message =
    let xdoc = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText03)
    let children = xdoc.ChildNodes
    children.[0 |> uint32].AppendChild(xdoc.CreateTextNode "Message coming") |> ignore
    children.[2 |> uint32].AppendChild(xdoc.CreateTextNode message) |> ignore
    let toast = new ToastNotification(xdoc)
    toast.add_Activated (fun notification _ -> 0 |> ignore) |> ignore
但我有以下例外:

首先,德国人:

System.IO.FileNotFoundException wurde nicht behandelt.
Message: Ein Ausnahmefehler des Typs "System.IO.FileNotFoundException" ist in Ineedtea.Server.exe aufgetreten.
Zusätzliche Informationen: Die Datei oder Assembly "Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
现在是英国人

System.IO.FileNotFoundException was not handled.
Message: An exception of type "System.IO.FileNotFoundException" appeared in Ineedtea.Server.exe.
Additional information: The file or assembly "Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null" or a dependency wasn't found. The system cannot find the file.

有人有想法吗?

我找到了一个解决方案,我创建了一个C#库,在那里我编写了Toaster类

检查此Github存储库中的代码:)