SeeminglyScience / EditorServicesCommandSuite

Collection of editor commands for use in PowerShell Editor Services.
Other
152 stars 13 forks source link

Exception calling "ProcessRecord" with "1" argument(s): "Method not found: 'Void OmniSharp.Extensions.LanguageServer.Protocol.Models.VersionedTextDocumentIdentifier.set_Version(Int64)'." #64

Closed aollivierre closed 3 years ago

aollivierre commented 3 years ago

$PSVersionTable

Name Value


PSVersion 7.1.2 PSEdition Core GitCommitId 7.1.2 OS Microsoft Windows 10.0.18363 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

when using Import-Module EditorServicesCommandSuite

ParentContainsErrorRecordException: Line | 351 | $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletizat … | ~~~~~~~~~~~~~~~ | Exception calling "ProcessRecord" with "1" argument(s): "Method not found: 'Void OmniSharp.Extensions.LanguageServer.Protocol.Models.VersionedTextDocumentIdentifier.set_Version(Int64)'."

When using Import-Module EditorServicesCommandSuite -UseWindowsPowerShell Exception: C:\Users\user\AppData\Local\Temp\remoteIpMoProxy_EditorServicesCommandSuite_1.0.0_localhost_661ca6f8-d875-42db-9593-80bb05deffe5\remoteIpMoProxy_EditorServicesCommandSuite_1.0.0_localhost_661ca6f8-d875-42db-9593-80bb05deffe5.psm1:882:9 Line | 882 | $steppablePipeline.End() | ~~~~~~~~ | Exception calling "ProcessRecord" with "1" argument(s): "Could not load file or assembly | 'Microsoft.PowerShell.PSReadLine2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one | of its dependencies. The system cannot find the file specified."

bchap1n commented 3 years ago

I'm seeing a similar error when running 'Splat Command' from vscode

❯ ParentContainsErrorRecordException: 
Line |
 351 |        $__cmdletization_objectModelWrapper.ProcessRecord($__cmdletizat …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "ProcessRecord" with "1" argument(s): "Method not found: 'Void OmniSharp.Extensions.LanguageServer.Protocol.Models.VersionedTextDocumentIdentifier.set_Version(Int64)'."
>code-insiders -v
1.55.0-insider
5d80c30e5b6ce8b2f5336ed55ad043490b0b818f
x64

Extension:
Name: PowerShell Preview
Id: ms-vscode.powershell-preview
Description: (Preview) Develop PowerShell scripts in Visual Studio Code!
Version: 2021.2.1
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell-Preview

>$psversiontable
PSVersion                      7.1.2
PSEdition                      Core
GitCommitId                    7.1.2
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
SeeminglyScience commented 3 years ago

Yep looks like omnisharp had another binary breaking change :/

Thanks for reporting, I'll fix it.

PrzemyslawKlys commented 3 years ago

Any timeline? We're pretty addicted to your tool 👯‍♂️

SeeminglyScience commented 3 years ago

Any timeline? We're pretty addicted to your tool 👯‍♂️

Looks like there's another, bigger update coming to OmniSharp next week. Looks very likely that there are more binary breaks so I'm waiting for that.

I don't typically like to recommend reverting to a previous PowerShell extension version, but I'm not gonna have enough time to do two releases, so if you want a fix now that'll do it.

bchap1n commented 3 years ago

bumping this since Omnisharp was updated a while back. :)

PrzemyslawKlys commented 3 years ago

The only problem is new Preview is broken for PowerShell 5.1

bchap1n commented 3 years ago

New Powershell Extension has Omnisharp v0.19.2 ✨

SeeminglyScience commented 3 years ago

Fixed in v1.0.0-beta4. Thanks everyone for your patience!