dotnet / dotnet/vscode-csharp

Failure to parse type while using `using NAME = CLASS`

Open
#5,146 1 comment 0 reactions 1 assignee Claimed by @JoeRobich View on GitHub
Needs Investigation OmniSharp Triaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

![image](https://user-images.githubusercontent.com/7494772/161397552-44f437c5-2ccb-4d04-8c33-de27083613a2.png)
![image](https://user-images.githubusercontent.com/7494772/161397547-8ffeadf3-561a-4c71-8a42-5083dbb93ce0.png)
![image](https://user-images.githubusercontent.com/7494772/161397694-f1f7fbb8-cf6b-40b9-97b5-fbd912559742.png)

I am doing some Interop and Omnisharp is on fire.

Omnisharp doesn't detect the proper type while doing `using NAME = CLASS` it actually just holds the first value type it sees and replaces all type instances of that class with it.

## Environment information ##

**VSCode version**: 1.65.2
**C# Extension**: 1.24.3

Dotnet Information
.NET SDK (reflecting any global.json):
Version: 6.0.102
Commit: 02d5242ed7

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.102\

Host (useful for support):
Version: 6.0.2
Commit: 839cdfb0ec

.NET SDKs installed:
6.0.102 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

|Extension|Author|Version|
|---|---|---|
|better-cpp-syntax|jeff-hykin|1.15.13|
|cmake|twxs|0.0.17|
|cmake-tools|ms-vscode|1.10.5|
|cpptools|ms-vscode|1.9.7|
|cpptools-extension-pack|ms-vscode|1.1.0|
|cpptools-themes|ms-vscode|1.0.0|
|csharp|ms-dotnettools|1.24.3|
|doxdocgen|cschlosser|1.4.0|
|gc-excelviewer|GrapeCity|4.2.54|
|java|redhat|1.4.0|
|language-x86-64-assembly|13xforever|3.0.0|
|project-manager|alefragnani|12.5.0|
|remote-containers|ms-vscode-remote|0.231.2|
|remote-ssh|ms-vscode-remote|0.76.1|
|remote-ssh-edit|ms-vscode-remote|0.78.0|
|remote-wsl|ms-vscode-remote|0.64.2|
|shader|slevesque|1.1.5|
|vscode-icons|vscode-icons-team|11.10.0|
|vscode-java-debug|vscjava|0.40.0|
|vscode-java-dependency|vscjava|0.19.0|
|vscode-java-pack|vscjava|0.22.2|
|vscode-java-test|vscjava|0.34.2|
|vscode-maven|vscjava|0.35.1|
|vscodeintellicode|VisualStudioExptTeam|1.2.18|;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.