vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Type completion doesn't work when using "Using namespace" statements

Open MartinGC94 opened this issue 3 years ago • 1 comments

Prerequisites

  • [X] I have written a descriptive issue title.
  • [X] I have searched all issues to ensure it has not already been reported.
  • [X] I have read the troubleshooting guide.
  • [X] I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • [X] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • [X] If this is a security issue, I have read the security issue reporting guidance.

Summary

using namespace System
[System.Object<Ctrl+Space>

The above scenario doesn't work.
If you remove the using statement or point it to something else like System.Management it works like you would expect.
I'm guessing the completion code doesn't handle the namespace text removal properly.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.3.0-preview.3
PSEdition                      Core
GitCommitId                    7.3.0-preview.3
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.67.0-insider
ab86e0229d6b4d0cb49cfd6747c92cafcd2bd4af
x64

Extension Version

[email protected]

Steps to Reproduce

1: Type in the following:

using namespace System
[System.Object

2: Try to complete the type

Visuals

No response

Logs

No response

MartinGC94 avatar Apr 26 '22 23:04 MartinGC94

@MartinGC94 thanks for opening this issue, we will need to look into what we are receiving from VSCode to resolve this issue

SydneyhSmith avatar May 03 '22 18:05 SydneyhSmith

@MartinGC94 we think this issue may be fixed, can you let us know if you are still experiencing it? Thanks!

SydneyhSmith avatar Aug 11 '22 17:08 SydneyhSmith

Can confirm, works for me.

MartinGC94 avatar Aug 11 '22 17:08 MartinGC94