question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestions for parameter types not working

See original GitHub issue

Issue Description

I am experiencing a problem with… not being given parameter types. It works, works, works and randomly stops.

image

I had this problem before and it was solved in: https://github.com/PowerShell/vscode-powershell/issues/2743 by @SeeminglyScience pointing to a module problem. The difference being it didn’t work at all back then, but now it’s working fine just simply fails after a while.

I’ve used the same debug steps as in other thread and this time it’s not about problems with that external helper module but some problems with DLL.

Is there anything I can do?

1598194129-afdfd4de-6452-4c44-a771-59ce3569b53b1598107482495.zip

TabExpansion2 -inputScript ($s = '[IDictionary') -cursorColumn $s.Length                      

Exception calling "CompleteInput" with "3" argument(s): "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
At line:38 char:16
+ ...      return [System.Management.Automation.CommandCompletion]::Complet ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ReflectionTypeLoadException
$e = $Error[0].Exception
while ($e -and $null -eq $e.LoaderExceptions) {
    $e = $e.InnerException
}

$e.LoaderExceptions | fl * -for



Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Message        : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName       : Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog      : WRN: Assembly binding logging is turned OFF.
                 To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                 Note: There is some performance penalty associated with assembly bind failure logging.
                 To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Data           : {}
InnerException :
TargetSite     :
StackTrace     :
HelpLink       :
Source         :
HResult        : -2147024894

Attached Logs

Follow the instructions in the README about capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.19042
VSCode 1.48.1
PowerShell Extension Version 2020.7.0

PowerShell Information

Name Value
PSVersion 5.1.19041.1
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.19041.1
BuildVersion 10.0.19041.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
better-toml bungcip 0.3.2
bracket-pair-colorizer-2 CoenraadS 0.2.0
errorlens usernamehw 3.2.0
format-selection-as-html adrianwilczynski 2.3.0
github-linker gimenete 0.2.3
gitlens eamodio 10.2.2
line-endings steditor 1.0.3
markdown-all-in-one yzhang 3.2.0
material-icon-theme PKief 4.2.0
open-in-browser techer 2.0.0
powershell-preview ms-vscode 2020.7.0
project-manager alefragnani 11.2.0
run-in-powershell tobysmith568 1.1.0
vscode-markdownlint DavidAnson 0.36.3
vscode-pull-request-github GitHub 0.19.0
vscode-toggle-quotes BriteSnow 0.3.3
vscode-wakatime WakaTime 4.0.0
vscode-yaml redhat 0.10.0
xml DotJoshJohnson 2.5.1

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
rjmholtcommented, Aug 26, 2020

I always assumed only newest is autoloader but seems it’s not true

The first one on the module path is autoloaded. In your case, the module in your user module path precedes the ones in the shared path, so is loaded despite its lower version. Also note that when two versions of the same module occur under the same path (like 2.0.2.105 and 2.0.2.102 here), the newest wins.

3reactions
rjmholtcommented, Aug 25, 2020

I’ll see if I can dig it up but it’s not a good solution generally because it’s super expensive to run and in a lot of cases isn’t actually needed

It may be, once other work is done, we could do something like detect an exception like this in tab completion somehow and have our own cache invalidation logic within PSES.

I know we chalk a lot of issues in the extension up to PowerShell itself being a difficult platform, and having worked on it for a while, it absolutely is (and not in obvious ways). BUT, as an editor/IDE we have to own the challenge of being robust, which is generally a case of shaving the yak to catch all the nasty little exceptions and details and work out what on earth we do with them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript function parameter type inferring not working
But when I introduce generic type into function declaration, the type inferring somehow not working. I have to explicitly write the type. Why ......
Read more >
Suggestion: Noninferential type parameter usage · Issue #14829
I encountered a problem when T is undefined , because undefined is not assignable to undefined & {} . I found that mapped...
Read more >
VS Code tips — The 'infer parameter types from usage' quick ...
Today's VS Code tip: infer parameter types from usage Tighten up your JavaScript and TypeScript by quickly adding explicit parameter types ...
Read more >
parameter | Looker - Google Cloud
LookML parameter: Create a filter-only field usable with Liquid parameters.
Read more >
Cucumber for Java plugin does not support custom ... - YouTrack
It appears you did not register parameter type. The details are in the stacktrace below. ... Caused by: io.cucumber.cucumberexpressions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found