Preview extension: There is no document formatter for 'powershell'-files installed.
When I use the preview extension, the formatter does not work. There is no auto-format when I type and when I press SHIFT + ALT + F, I get this error message:
There is no document formatter for 'powershell'-files installed.
Attached Logs
Successfully activated to Diagnostic but got this error when I typed Open PowerShell Extension Logs Folder in the command palette:
command 'PowerShell.OpenLogFolder' not found
Environment Information
Visual Studio Code
| Name | Version |
|---|---|
| Operating System | Windows_NT x64 10.0.17763 |
| VSCode | 1.30.2 |
| PowerShell Extension Version | 1.11.0 - DISABLED |
| PowerShell Extension Version Preview | 2.0.0-preview.1 |
PowerShell Information
| Name | Value |
|---|---|
| PSVersion | 6.1.2 |
| PSEdition | Core |
| GitCommitId | 6.1.2 |
| OS | Microsoft Windows 10.0.17763 |
| Platform | Win32NT |
| PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.1.2 |
| PSRemotingProtocolVersion | 2.3 |
| SerializationVersion | 1.1.0.1 |
| WSManStackVersion | 3.0 |
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
| Extension | Author | Version |
|---|---|---|
| azure-account | ms-vscode | 0.8.0 |
| azurerm-vscode-tools | msazurermtools | 0.4.2 |
| code-settings-sync | Shan | 3.2.4 |
| gitlens | eamodio | 9.4.1 |
| PowerShell | ms-vscode | 1.11.0 |
| shell-launcher | Tyriar | 0.3.0 |
| vscode-icons | robertohuertasm | 8.0.0 |
@fullenw1 we are trying to re-pro your issue and I am wondering if you are using an empty workspace? Thanks!
@SydneyhSmith
Yes that's correct. When I load a workspace the formatter is working fine again.
This will be fixed in the next release. #1728
Adding a workspace didn't work. Downgrading to a previous version worked for me.
Seeing the same issue. If I open up a workspace this is resolved.
Hi all, wondering if you are still reaching this issue after our recent updates?
Hi, it's working fine for me now. Good job!
Great, I will close this issue for now!
This is an issue for me in 1.47.3
I'm having this issue in v 1.5.1.1. I have version 2020.6.0 of the PowerShell extension.
@necoras , if it helps any, I was having the same issue and reinstalling the extension fixed it for me.
My issue ended up being a corrupted path environment variable.
Same issue after upgrading to 1.56.2. 2021/05/19 15:27:00 [NORMAL] - Visual Studio Code v1.56.2 64-bit 2021/05/19 15:27:00 [NORMAL] - PowerShell Extension v2021.2.2 2021/05/19 15:27:00 [NORMAL] - Operating System: Windows 64-bit
I had the same issue and, like @rsb177, uninstalling and reinstalling the extensions fixed it.
Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead.
Same issue with version v2023.6.0. Uninstalling and reinstalling the extensions did NOT fix it.
@necoras: what was your issue with the PATH?
Using x86 powershell worked for me
Using x86 powershell worked for me
This works for me. $PSVersionTable
| Name | Value |
|---|---|
| PSVersion | 5.1.22621.2506 |
| PSEdition | Desktop |
| PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0...} |
| BuildVersion | 10.0.22621.2506 |
| CLRVersion | 4.0.30319.42000 |
| WSManStackVersion | 3.0 |
| PSRemotingProtocolVersion | 2.3 |
| SerializationVersion | 1.1.0.1 |
