SeeminglyScience / EditorServicesCommandSuite

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

Cannot convert argument "psEditor", with value: "Microsoft.PowerShell.EditorServices.Extensions.EditorObject" #53

Closed PrzemyslawKlys closed 4 years ago

PrzemyslawKlys commented 4 years ago

Errors again in Preview

Import-Module -Name EditorServicesCommandSuite
Cannot convert argument "psEditor", with value: "Microsoft.PowerShell.EditorServices.Extensions.EditorObject", for "GetCommandSuite" to type "Microsoft.PowerShell.EditorServices.Extensions.EditorObject": "Cannot convert the "Microsoft.PowerShell.EditorServices.Extensions.EditorObject" value of type "Microsoft.PowerShell.EditorServices.Extensions.E
ditorObject" to type "Microsoft.PowerShell.EditorServices.Extensions.EditorObject"."
At C:\Program Files\WindowsPowerShell\Modules\EditorServicesCommandSuite\1.0.0\EditorServicesCommandSuite.psm1:19 char:5
+     $CommandSuite = $type::GetCommandSuite(
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Get-RefactorOption : No existing CommandSuite instance was found. Initialization with the host editor may have failed.
At C:\Program Files\WindowsPowerShell\Modules\EditorServicesCommandSuite\1.0.0\EditorServicesCommandSuite.psm1:53 char:9
+         Get-RefactorOption | ForEach-Object {
+         ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Get-RefactorOption], NoCommandSuiteInstanceException
    + FullyQualifiedErrorId : NoCommandSuiteInstance,EditorServicesCommandSuite.Commands.GetRefactorOptionCommand
SeeminglyScience commented 4 years ago

Should be fixed with v1.0.0-beta2. This message is different from the other reports and what I personally was able to reproduce, but I assume it's the same. If you still hit this after updating, let me know please! Thanks again!

PrzemyslawKlys commented 4 years ago

It's gone after update, at least for now.