XAML File needed after Compiling

When I have tested the WPF Designer and created an EXE out of the PS1 Script and run it, an Error comes up that the XAML File is not avalibale on the OUT-Directory.
Should it be included into the EXE or is it nessacery to have the xaml File too?


It should be included. Are you using PSScriptPad or Visual Studio to create the XAML file and package the executable?

I’m using VS-Code for the packaging of the PS1 File.
And to edit the XAML i use the PSScriptPad.

This is the automatic created package.psd1


        Root = 'h:\Powershell\WPF-Powershell\window.ps1'

        OutputPath = 'h:\Powershell\WPF-Powershell\out'

        Package = @{

            Enabled = $true

            Obfuscate = $false

            HideConsoleWindow = $false

            DotNetVersion = 'v4.6.2'

            FileVersion = '1.0.0'

            FileDescription = ''

            ProductName = ''

            ProductVersion = ''

            Copyright = ''

            RequireElevation = $false

            ApplicationIconPath = ''

            PackageType = 'Console'


        Bundle = @{

            Enabled = $true

            Modules = $true

            # IgnoredModules = @()



Ok. Thank you! I’ve fixed this issue and made the packager a bit more intelligent when locating the XAML file. Please update to the latest version of the VS Code extension and try it out.

It’s currently in the release pipeline and should be available soon.

1 Like

After the Update it’ working!

Thank you very much!