Skip to content

PowerShell Preview: Command 'PowerShell: Get details about the PowerShell version that the PowerShell extension is using' resulted in an error (command 'PowerShell.GetPowerShellVersionDetails' not found) #3105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pcgeek86 opened this issue Dec 20, 2020 · 4 comments · Fixed by #3564
Assignees
Labels
Area-UI Issue-Bug A bug to squash.

Comments

@pcgeek86
Copy link
Contributor

System Details

System Details Output

Issue Description

VSCode displays error message

Command 'PowerShell: Get details about the PowerShell version that the PowerShell extension is using' resulted in an error (command 'PowerShell.GetPowerShellVersionDetails' not found)

image

Expected Behaviour

VSCode returns details about the PowerShell version that the PowerShell extension is using.

Actual Behaviour

See Issue Description

Attached Logs

@ghost ghost added the Needs: Triage Maintainer attention needed! label Dec 20, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Jan 5, 2021

This command is one of the three that make up the current (small/WIP) external APIs.

I need to track down whether the fact that they're unregistered is intentional or not, but basically we need to either:

  • Register the ones that make sense for an editor user to call
  • Find a way to hide them from VSCode while still exposing them to other extensions (may not be possible)
  • Make it so that calling them from the editor shows a nicer error message (may not be possible)

For this particular API, you can get the information it retrieves from the integrated console for now ($PSHOME and $PSVersionTable should do it).

@rjmholt rjmholt added Issue-Bug A bug to squash. and removed Needs: Triage Maintainer attention needed! labels Jan 5, 2021
@TylerLeonhardt
Copy link
Member

These commands were removed in favor of a much cleaner exported API. An example of how you can take advantage of this is here:

https://github.com/TylerLeonhardt/vscode-pester-test-adapter/blob/master/src/powershellExtension.ts#L21-L23

It's much easier to use the actual language rather than these weird commands that I had originally started with. Since they were only ever added to the preview extension, we were able to break this way.

My dream was to one day ship that file (https://github.com/TylerLeonhardt/vscode-pester-test-adapter/blob/master/src/powershellExtension.ts) in an npm package so it was easier to pull in and you'd get completions and whatnot... but never had time.

@TylerLeonhardt
Copy link
Member

Looks like I forgot to remove the references here:
https://github.com/PowerShell/vscode-powershell/blob/master/package.json#L350-L364

@andyleejordan andyleejordan self-assigned this Sep 13, 2021
@andyleejordan andyleejordan added this to the Committed-vNext milestone Sep 13, 2021
@andyleejordan
Copy link
Member

Just ran into this and was about to open an issue against myself 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UI Issue-Bug A bug to squash.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants