KB3004 - Visual Studio Code missing "Package EXE" button

KB3004 - Visual Studio Code missing "Package EXE" button

Symptom

The 'Package EXE' button is missing from Visual Studio Code (with the PowerShell Pro Tools extension1 installed).



Scenario #1

You don't have a PowerShell script file (*.ps1) file loaded in VS Code

Solution

Load a PowerShellscript file (*.ps1) in VS Code. This will cause the buttons to appear.




Scenario #2

The PowerShell Pro Tools extension is not actually installed

Solution

a) Check the extension is installed in VS Code (Ctrl+Shift+X)



b) Check the extensions folder in your user profile to see if it looks as expected (typically C:\Users\[username]\.vscode\extensions



Very often reinstalling VS Code and/or the PowerShell Pro tools extension will resolve the problem.


Scenario #3

The PowerShell Pro Tools extension is somehow corrupted on your local computer.

Solution

Same as #2 except you might need to reset your entire VS Code profile (i.e. your .vscode directory)

See this post on StackOverflow for guidance on how to manually reset VS Code: https://stackoverflow.com/questions/36108515/how-to-reset-settings-in-visual-studio-code


Scenario #4

Your version of the PowerShell Pro Tools extension is very old. This is intentional because you are on a perpetual license.

Solution

If you can't update your version of PowerShell Pro Tools and you find yourself unable to load the extension, then you may be impacted by KB3002. Please see that article for the resolution.

Background
If Microsoft decides to make changes to their PowerShell extension for VS code, then this can cause impact to previous versions of PowerShell Pro Tools which are not updated to reflect that change. That is what happened in 2022 with KB3002.

References



    • Related Articles

    • "Failed to attach the PowerShell debug engine debugger" error when attempting to run scripts in Visual Studio

      Version: PowerShell Tools for Visual Studio 5.x Issue: When attempting to run scripts in Visual Studio, an error will be shown when attempting to start the debugger. This can happen both by pressing F5 with a PowerShell script open or by clicking the ...
    • KB3007 - Resetting PowerShell Pro Tools (Visual Studio)

      Scope This article applies to Visual Studio 2017, 2019 and 2022 (Community, Professional and Enterprise) with the PowerShell Tools for Visual Studio [2002] extension. Problem The PowerShell Tools for Visual Studio extension will not load or A ...
    • WPF and WinForms app do not appear when running in Visual Studio

      Product: PowerShell Pro Tools for Visual Studio Version: Any Issue: When running a PowerShell WPF or WinForm script, the script will start but it will not show the window at all.  Resolution: 1. When running a WPF form, ensure that the file that is ...
    • KB3006 - WPF Item is missing in VS2022

      Symptom The option to add a WPF Item (i.e. XAML) to a PowerShell Script Project in Visual Studio 2022 is no longer available. Cause At some point in August 2023, Microsoft introduced breaking changes into Visual Studio 2022 around WPF handling. As a ...
    • KB3003 - Resetting PowerShell Pro Tools (VS Code)

      Problem PowerShell Pro Tools (for VS Code) is not behaving as expected. For example, pressing the 'Show Form Designer' button does not successfully launch PSScriptPad (only the splash screen is shown). Solution This solution assumes that you have VS ...