I’m trying to add in some toast notifications, in ISE this works fine, but in visual studio, it never closes the element correctly and thinks the rest of my code is quoted text and throws an error.
# Define the toast notification in XML format
[xml]$ToastTemplate = @"
<toast duration="long">
<visual>
<binding template="ToastGeneric">
<image placement="hero" src="$HeroImage"/>
<image placement="appLogoOverride" hint-crop="circle" src="$ImageFile"/>
<text>$Sender</text>
<group>
<subgroup>
<text hint-style="body" hint-wrap="true" >$Message</text>
</subgroup>
</group>
</binding>
</visual>
<audio src="$AudioSource"/>
</toast>
"@
Tries using single quotes too, but the issue still persists.