dotnet / dotnet/roslyn

No local name suggestions in top-level code

Open
#79,031 6 comments 0 reactions 1 assignee Claimed by @333fred View on GitHub
Area-Compilers
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

### Version
VS Code: 1.101.0
C# Extension: 2.82.12

### Steps to reproduce

1. Open a new console project with a top-level `Program.cs` file.
2. Add a new local using a custom type, such as `List`
4. Observe not getting a suggestion.
### Expected Behavior

`people` is suggested for the local of type `List`.

This is the behavior in other contexts, such as in a simple `void M() { }` local function in the top-level code.

### Actual Behavior

Nothing is suggested.

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.