Skip to content

Classes from NestedModules are not known to Intellisense #2451

@LethiferousMoose

Description

@LethiferousMoose

System Details

System Details Output

### VSCode version: 1.41.1 26076a4de974ead31f97692a0d32f90d735645c0 x64

### VSCode extensions:       
dbaeumer.vscode-eslint@2.0.15
DotJoshJohnson.xml@2.5.0     
minhthai.vscode-todo-parser@1.9.1
ms-mssql.mssql@1.8.0
ms-vscode.cpptools@0.26.3
ms-vscode.powershell@2020.1.0
ryanluker.vscode-coverage-gutters@2.4.2
streetsidesoftware.code-spell-checker@1.7.22
VisualStudioExptTeam.vscodeintellicode@1.2.4
wayou.vscode-todo-highlight@1.0.4
yzhang.markdown-all-in-one@2.7.0


### PSES version: 1.13.3.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      6.2.4
PSEdition                      Core
GitCommitId                    6.2.4
OS                             Microsoft Windows 10.0.18362 
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

I recently started using C# cmdlets and migrated a lot of classes from PowerShell into a shared location to be accessed between PowerShell and C# modules. After experimenting and getting assistance from the PowerShell team (see question) I found that in order to use custom classes from C# modules I am to include them in the NestedModules attribute on the manifest (psd1) file. This fixes all the issues I was having exposing the classes to the module, it does however not fix the VS Code plugin, as they are marked in red with error Unable to find type. Is this something the plugin can support?

Expected Behaviour

Classes from C# module are detected by Intellisense.

Actual Behaviour

Classes from C# module are not detected by Intellisense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions