From b85450711db1db92aafb001ede4b1008240248de Mon Sep 17 00:00:00 2001 From: Josh King Date: Mon, 5 Oct 2020 09:41:51 +1300 Subject: [PATCH] Only add WinRT type on Win PS, should fix #120 --- BurntToast/Public/Update-BTNotification.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BurntToast/Public/Update-BTNotification.ps1 b/BurntToast/Public/Update-BTNotification.ps1 index ad387b4..3e34c51 100644 --- a/BurntToast/Public/Update-BTNotification.ps1 +++ b/BurntToast/Public/Update-BTNotification.ps1 @@ -54,8 +54,9 @@ Write-Warning -Message "The AppId $AppId is not present in the registry, please run New-BTAppId to avoid inconsistent Toast behaviour." } - $null = [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] - $null = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] + if (-not $IsWindows) { + $null = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] + } if ($DataBinding) { $DataDictionary = New-Object 'system.collections.generic.dictionary[string,string]'