I am getting an error when I Package as executable.
At line:2 char:1
- Using Namespace System.Windows.Controls
A ‘using’ statement must appear before any other statements in a script.
Here is the code that causes it:
Using Namespace System.Windows.Controls
Using Namespace System.ComponentModel
<# TODO: Add logic to handle scanning same computer twice #>
$XamlFiles = Get-ChildItem -Path “$PSScriptRoot*.xaml”
The using statements are the first two lines of code in the script and the script works just fine. Is this a bug or do I need the Pro version? I’m using the free version of course.