-
Notifications
You must be signed in to change notification settings - Fork 510
Suggestions for parameter types not working #2743
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
Comments
Works for me. Windows PowerShell is really finicky with it's type completion because it didn't account for the fact that type discovery sometimes throws (like JIT and assembly resolution errors). Next time you see it try this directly in the console: TabExpansion2 -inputScript ($s = '[IDictionary') -cursorColumn $s.Length If that throws, there's a good chance that an assembly was loaded in the current session that type discovery doesn't handle well. Especially if you have an older version of .NET framework then pretty much any netstandard targeting assembly will cause it. |
After you get that error can you run this pls: $e = $Error[0].Exception
while ($e -and $null -eq $e.LoaderExceptions) {
$e = $e.InnerException
}
$e.LoaderExceptions | fl * -for |
|
After I've removed module from loading - it works. |
Yep that's a JIT time exception for sure. FWIW that won't affect completion in PS7 since the type completion API now catches those exceptions during type discovery. @TylerLeonhardt You know if there's any more breaking changes coming in the near future? (I know we've already discussed this one in particular, just trying to see if I should expect more shortly). |
Thank you @SeeminglyScience, appreciate your help! |
Issue Description
I am experiencing a problem with... suggestions for parameter types not working.
In code:
This used to work. It's not working in production and preview. It's very useful in ISE.
Attached Logs
Follow the instructions in the README about
capturing and sending logs.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: