Windos / BurntToast

Module for creating and displaying Toast Notifications on Microsoft Windows 10.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update-BTNotification hitting WinRT errors on PowerShell 7.1

Windos opened this issue · comments

Steps to reproduce

$Id = 'DemoUpdate'

$DataBinding = @{
    HeadingPlaceholder = 'Demo Update'
    TextPlaceholder    = 'This is the first example line of text'
}

New-BurntToastNotification -Text 'HeadingPlaceholder', 'TextPlaceholder' -UniqueIdentifier $Id -DataBinding $DataBinding


$DataBinding['TextPlaceholder'] = 'This is the second example line of text'
Update-BTNotification -UniqueIdentifier $Id -DataBinding $DataBinding


$DataBinding['TextPlaceholder'] = 'This is the third example line of text'
Update-BTNotification -UniqueIdentifier $Id -DataBinding $DataBinding

Expected behavior

Toast notification is updated twice after initial display and generates no errors.

Actual behavior

The notification is updated, but outputs errors.

image

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.0-preview.7
PSEdition                      Core
GitCommitId                    7.1.0-preview.7
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}       
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
OsName         : Microsoft Windows 10 Pro for Workstations
OsVersion      : 10.0.19041
OsArchitecture : 64-bit
    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     0.8.2                 BurntToast                          Desk      {Get-BTHistory, New-BTAction, New-BTAppId, New-BTAudio…}
Script     0.7.2                 BurntToast                          Desk      {Get-BTHistory, New-BTAction, New-BTAppId, New-BTAudio…}