vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Preview extension: There is no document formatter for 'powershell'-files installed.

Open fullenw1 opened this issue 7 years ago • 18 comments

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 avatar Jan 27 '19 15:01 fullenw1

@fullenw1 we are trying to re-pro your issue and I am wondering if you are using an empty workspace? Thanks!

SydneyhSmith avatar Jan 31 '19 22:01 SydneyhSmith

@SydneyhSmith

Yes that's correct. When I load a workspace the formatter is working fine again.

fullenw1 avatar Feb 04 '19 19:02 fullenw1

This will be fixed in the next release. #1728

TylerLeonhardt avatar Feb 04 '19 21:02 TylerLeonhardt

Adding a workspace didn't work. Downgrading to a previous version worked for me.

pdhimate avatar Feb 06 '19 05:02 pdhimate

Seeing the same issue. If I open up a workspace this is resolved.

KaylorDave avatar Feb 21 '19 18:02 KaylorDave

Hi all, wondering if you are still reaching this issue after our recent updates?

SydneyhSmith avatar Apr 25 '19 20:04 SydneyhSmith

Hi, it's working fine for me now. Good job!

fullenw1 avatar Apr 26 '19 18:04 fullenw1

Great, I will close this issue for now!

SydneyhSmith avatar Apr 26 '19 20:04 SydneyhSmith

This is an issue for me in 1.47.3

MalcolmAnderson avatar Jul 29 '20 16:07 MalcolmAnderson

I'm having this issue in v 1.5.1.1. I have version 2020.6.0 of the PowerShell extension.

necoras avatar Nov 16 '20 20:11 necoras

@necoras , if it helps any, I was having the same issue and reinstalling the extension fixed it for me.

rsb177 avatar Nov 18 '20 17:11 rsb177

My issue ended up being a corrupted path environment variable.

necoras avatar Nov 18 '20 19:11 necoras

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

henrivdr01 avatar May 19 '21 13:05 henrivdr01

I had the same issue and, like @rsb177, uninstalling and reinstalling the extensions fixed it.

charlesroper avatar Dec 09 '21 13:12 charlesroper

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.

ghost avatar Dec 09 '21 13:12 ghost

Same issue with version v2023.6.0. Uninstalling and reinstalling the extensions did NOT fix it.

@necoras: what was your issue with the PATH?

joel-schaal avatar Aug 25 '23 14:08 joel-schaal

Using x86 powershell worked for me obraz

konrad-lapinski avatar Jan 11 '24 09:01 konrad-lapinski

Using x86 powershell worked for me obraz

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

NestDream avatar May 22 '24 01:05 NestDream