dotnet / dotnet/vscode-csharp

Auto completion not working on file-based apps?

Open
#8,797 5 comments 0 reactions 1 assignee Claimed by @RikkiGibson View on GitHub
Feature - Run File
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

Type: Bug

## Issue Description ##
## Steps to Reproduce ##
- Create `%anyname%`.cs anywhere, open this file (not directory) with vscode.
- Try typing something like `Console.WriteLine`
- See that autocompletion isn't working

## Expected Behavior ##
Autocompletion is working, intellisense helps with code and other stuff

## Actual Behavior ##
Just nothing. It can only see variables/etc but for stuff like `var sw = new StreamWriter(listGeneralPath, true)` when i type `sw.` nothing is shown

Extension version: 2.100.11
VS Code version: Code 1.106.1 (cb1933bbc38d329b3595673a600fab5c7368f0a7, 2025-11-16T10:20:23.745Z)
OS version: Windows_NT x64 10.0.19045
Modes:

### Logs ###

### C# log ###

```
2025-11-18 22:30:23.406 [info] Installing C# dependencies...
2025-11-18 22:30:23.406 [info]

2025-11-18 22:30:23.406 [info] Platform: win32, x86_64

2025-11-18 22:30:23.406 [info]

2025-11-18 22:30:23.406 [info] Downloading package 'Language server for Roslyn Copilot integration'
2025-11-18 22:30:24.558 [info] (47 KB)
2025-11-18 22:30:24.558 [info] .......
2025-11-18 22:30:24.765 [info] .......
2025-11-18 22:30:24.766 [info] ......
2025-11-18 22:30:24.766 [info] Done!

2025-11-18 22:30:24.767 [info] Validating download...

2025-11-18 22:30:24.767 [info] Integrity Check succeeded.

2025-11-18 22:30:24.767 [info] Installing package 'Language server for Roslyn Copilot integration'

2025-11-18 22:30:24.767 [info]

2025-11-18 22:30:24.774 [info] Finished

2025-11-18 22:30:24.774 [info]

2025-11-18 22:30:25.333 [info] Locating .NET runtime version 9.0.1
2025-11-18 22:30:25.419 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2025-11-18 22:30:25.419 [info] Activating C# + C# Dev Kit...
2025-11-18 22:30:25.560 [info] [stdout] info: Program[0]
Server started with process ID 10080

2025-11-18 22:30:26.463 [info] [stdout] {"pipeName":"\\\\.\\pipe\\66fabd66"}

2025-11-18 22:30:26.463 [info] received named pipe information from server
2025-11-18 22:30:26.463 [info] client has connected to server
2025-11-18 22:30:26.557 [info] [Program] Language server initialized
2025-11-18 22:32:18.650 [info] Locating .NET runtime version 9.0.1
2025-11-18 22:32:18.733 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2025-11-18 22:32:18.733 [info] Activating C# + C# Dev Kit...
2025-11-18 22:32:18.859 [info] [stdout] info: Program[0]
Server started with process ID 13896

2025-11-18 22:32:19.328 [info] [stdout] {"pipeName":"\\\\.\\pipe\\9b3bd6f9"}

2025-11-18 22:32:19.328 [info] received named pipe information from server
2025-11-18 22:32:19.329 [info] client has connected to server
2025-11-18 22:32:19.438 [info] [Program] Language server initialized
2025-11-18 22:34:51.540 [info] Locating .NET runtime version 9.0.1
2025-11-18 22:34:51.576 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2025-11-18 22:34:51.576 [info] Activating C# standalone...
2025-11-18 22:34:51.751 [info] [stdout] info: Program[0]
Server started with process ID 12388

2025-11-18 22:34:52.444 [info] [stdout] {"pipeName":"\\\\.\\pipe\\b6e2a0da"}

2025-11-18 22:34:52.444 [info] received named pipe information from server
2025-11-18 22:34:52.445 [info] client has connected to server
2025-11-18 22:34:52.538 [info] [Program] Language server initialized
2025-11-18 22:35:24.645 [info] Detected new installation of ms-dotnettools.csdevkit
2025-11-18 22:35:28.151 [info] Locating .NET runtime version 9.0.1
2025-11-18 22:35:28.272 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2025-11-18 22:35:28.273 [info] Activating C# + C# Dev Kit...
2025-11-18 22:35:28.401 [info] [stdout] info: Program[0]
Server started with process ID 3692

2025-11-18 22:35:28.879 [info] [stdout] {"pipeName":"\\\\.\\pipe\\8525f145"}

2025-11-18 22:35:28.879 [info] received named pipe information from server
2025-11-18 22:35:28.880 [info] client has connected to server
2025-11-18 22:35:28.980 [info] [Program] Language server initialized
2025-11-18 22:37:26.701 [info] Locating .NET runtime version 9.0.1
2025-11-18 22:37:26.784 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2025-11-18 22:37:26.784 [info] Activating C# + C# Dev Kit...
2025-11-18 22:37:26.921 [info] [stdout] info: Program[0]
Server started with process ID 15592

2025-11-18 22:37:27.438 [info] [stdout] {"pipeName":"\\\\.\\pipe\\5004b59e"}

2025-11-18 22:37:27.438 [info] received named pipe information from server
2025-11-18 22:37:27.438 [info] client has connected to server
2025-11-18 22:37:27.538 [info] [Program] Language server initialized

```

### C# LSP Trace Logs log ###

```

```

## Environment Information ##
**VSCode version**: 1.106.1
**C# Extension**: 2.100.11
**Using OmniSharp**: false

Dotnet Information
.NET SDK:
Version: 10.0.100
Commit: b0f34d51fc
Workload version: 10.0.100-manifests.4c0ca8ba
MSBuild version: 18.0.2+b0f34d51f

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100\

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 10.0.0
Architecture: x64
Commit: b0f34d51fc

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

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

Other architectures found:
None

Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]
DOTNET_MULTILEVEL_LOOKUP [undefined]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions

|Extension|Author|Version|Folder Name|
|---|---|---|---|
|cpptools|ms-vscode|1.28.3|ms-vscode.cpptools-1.28.3-win32-x64|
|csdevkit|ms-dotnettools|1.80.7|ms-dotnettools.csdevkit-1.80.7-win32-x64|
|csharp|ms-dotnettools|2.100.11|ms-dotnettools.csharp-2.100.11-win32-x64|
|debugpy|ms-python|2025.16.0|ms-python.debugpy-2025.16.0-win32-x64|
|go|golang|0.50.0|golang.go-0.50.0|
|jupyter|ms-toolsai|2025.9.1|ms-toolsai.jupyter-2025.9.1-win32-x64|
|jupyter-keymap|ms-toolsai|1.1.2|ms-toolsai.jupyter-keymap-1.1.2|
|jupyter-renderers|ms-toolsai|1.3.0|ms-toolsai.jupyter-renderers-1.3.0|
|python|ms-python|2025.18.0|ms-python.python-2025.18.0-win32-x64|
|rust-analyzer|rust-lang|0.3.2683|rust-lang.rust-analyzer-0.3.2683-win32-x64|
|vscode-dotnet-runtime|ms-dotnettools|2.3.7|ms-dotnettools.vscode-dotnet-runtime-2.3.7|
|vscode-jupyter-cell-tags|ms-toolsai|0.1.9|ms-toolsai.vscode-jupyter-cell-tags-0.1.9|
|vscode-jupyter-slideshow|ms-toolsai|0.1.6|ms-toolsai.vscode-jupyter-slideshow-0.1.6|
|vscode-pylance|ms-python|2025.9.1|ms-python.vscode-pylance-2025.9.1|
|vscode-python-envs|ms-python|1.12.0|ms-python.vscode-python-envs-1.12.0-win32-x64|;

C# Settings

|Setting|Value|
|---|---|
|preferCSharpExtension|false|
|compilerDiagnosticScope|openFiles|
|analyzerDiagnosticScope|openFiles|
|enableXamlTools|true|
|useServerGC|true|;

System Info

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 5 3600 6-Core Processor (12 x 3593)|
|GPU Status|2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|31.95GB (24.27GB free)|
|Process Argv|--crash-reporter-id 10b94d38-98e4-4a90-962a-a9fe1d02647e|
|Screen Reader|no|
|VM|0%|

A/B Experiments

```
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
aj953862:31281341
nes-set-on:31351930
6abeh943:31336334
editstats-enabled:31346257
aa_t:31379598
t123456:31413567
gaj49834:31404438
cloudbuttont:31379625
todos-1:31405332
v66_all_req:31402695
treatment_gpt5applypatchexclusively:31412086
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
auto_model_enabled:31385282
use-responses-api:31390855
afag3459:31419926
673df989:31418077
ff8f5884:31411053
defaultvisibility:31420717
c0683394:31419495

```

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.