Skip to content

C# Dev Kit issue where you cannot create a C# class with a template #9375

@KYAWNAYMYO

Description

@KYAWNAYMYO

Type: Bug

Issue Description

C# Dev Kit issue where you cannot create a C# class with a template

Steps to Reproduce

Create new file under C# project folder

Expected Behavior

VS Code supposed to show the available template for C# class, e.g a controller or a class or an interface, etc.

Actual Behavior

just created a black file without .cs extension

Extension version: 2.140.8
VS Code version: Code 1.120.0 (0958016b2af9f09bb4257e0df4a95e2f90590f9f, 2026-05-12T20:17:22Z)
OS version: Windows_NT x64 10.0.19045
Modes:

Logs

C# log

Details
2026-06-02 10:46:00.350 [info] Installing C# dependencies...
2026-06-02 10:46:00.350 [info] 

2026-06-02 10:46:00.350 [info] Platform: win32, x86_64

2026-06-02 10:46:00.350 [info] 

2026-06-02 10:46:00.350 [info] Downloading package 'Language server for Roslyn Copilot integration' 
2026-06-02 10:46:01.575 [info] (47 KB)
2026-06-02 10:46:01.575 [info] .......
2026-06-02 10:46:01.747 [info] .......
2026-06-02 10:46:01.755 [info] ......
2026-06-02 10:46:01.755 [info]  Done!

2026-06-02 10:46:01.757 [info] Validating download...

2026-06-02 10:46:01.757 [info] Integrity Check succeeded.

2026-06-02 10:46:01.757 [info] Installing package 'Language server for Roslyn Copilot integration'

2026-06-02 10:46:01.757 [info] 

2026-06-02 10:46:01.778 [info] Downloading package 'VSWebAssemblyBridge (Platform Agnostic)' 
2026-06-02 10:46:04.187 [info] Failed at stage: downloadPackage

2026-06-02 10:46:04.187 [info] Error: connect ECONNREFUSED 20.209.142.129:443

2026-06-02 10:46:04.187 [info] 

2026-06-02 10:46:05.011 [info] Locating .NET runtime version 10.0.5
2026-06-02 10:46:05.175 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2026-06-02 10:46:05.176 [info] Activating C# + C# Dev Kit...
2026-06-02 10:46:05.507 [info] info: Program[0]
2026-06-02 10:46:05.508 [info]       Server started with process ID 7280
2026-06-02 10:46:08.637 [info] [Program] Language server initialized
2026-06-02 10:46:08.661 [info] [Program] Monitoring client process 14804 for exit
2026-06-02 10:46:09.947 [info] [initialized] [Microsoft.CodeAnalysis.LanguageServer.FileBasedPrograms.FileBasedProgramsEntryPointDiscovery] Finished discovery in 'c:\Users\naymy\source\repos\ConsoleApp2' in 11 milliseconds

C# LSP Trace Logs log

Details

Environment Information

VSCode version: 1.120.0
C# Extension: 2.140.8
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 10.0.108 Commit: 94ea82652c Workload version: 10.0.100-manifests.b47d7e23 MSBuild version: 18.0.11+94ea82652

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.108\

.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.8
Architecture: x64
Commit: 94ea82652c

.NET SDKs installed:
2.1.505 [C:\Program Files\dotnet\sdk]
2.1.700 [C:\Program Files\dotnet\sdk]
8.0.206 [C:\Program Files\dotnet\sdk]
8.0.421 [C:\Program Files\dotnet\sdk]
9.0.314 [C:\Program Files\dotnet\sdk]
10.0.108 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]

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
better-comments aaron-bond 3.0.2 aaron-bond.better-comments-3.0.2
csdevkit ms-dotnettools 3.20.199 ms-dotnettools.csdevkit-3.20.199-win32-x64
csharp ms-dotnettools 2.140.8 ms-dotnettools.csharp-2.140.8-win32-x64
data-workspace-vscode ms-mssql 0.6.3 ms-mssql.data-workspace-vscode-0.6.3
gitlens eamodio 18.0.0 eamodio.gitlens-18.0.0
material-icon-theme PKief 5.35.0 pkief.material-icon-theme-5.35.0
mssql ms-mssql 1.42.2 ms-mssql.mssql-1.42.2
ng-template Angular 21.2.4 angular.ng-template-21.2.4
prettier-vscode esbenp 12.4.0 esbenp.prettier-vscode-12.4.0
remote-wsl ms-vscode-remote 0.104.3 ms-vscode-remote.remote-wsl-0.104.3
sql-bindings-vscode ms-mssql 0.4.1 ms-mssql.sql-bindings-vscode-0.4.1
sql-database-projects-vscode ms-mssql 1.5.9 ms-mssql.sql-database-projects-vscode-1.5.9
todo-tree Gruntfuggly 0.0.226 gruntfuggly.todo-tree-0.0.226
vscode-azureappservice ms-azuretools 0.27.0 ms-azuretools.vscode-azureappservice-0.27.0
vscode-azureresourcegroups ms-azuretools 0.12.5 ms-azuretools.vscode-azureresourcegroups-0.12.5
vscode-containers ms-azuretools 2.4.5 ms-azuretools.vscode-containers-2.4.5
vscode-dotnet-pack ms-dotnettools 1.0.13 ms-dotnettools.vscode-dotnet-pack-1.0.13
vscode-dotnet-runtime ms-dotnettools 3.0.2 ms-dotnettools.vscode-dotnet-runtime-3.0.2
vscode-eslint dbaeumer 3.0.24 dbaeumer.vscode-eslint-3.0.24
vscode-nuget-gallery patcx 1.2.6 patcx.vscode-nuget-gallery-1.2.6
vscode-sqlite alexcvzz 0.14.1 alexcvzz.vscode-sqlite-0.14.1
vscode-tailwindcss bradlc 0.14.29 bradlc.vscode-tailwindcss-0.14.29
C# Settings
Setting Value
preferCSharpExtension false
compilerDiagnosticScope openFiles
analyzerDiagnosticScope openFiles
enableXamlTools true
useServerGC true
System Info
Item Value
CPUs Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (4 x 2712)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x5916 [Intel(R) HD Graphics 620], DRIVER_VENDOR=Intel, DRIVER_VERSION=27.20.100.8682 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.19041.5794
Machine model name:
Machine model version:
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
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 7.92GB (1.69GB free)
Process Argv --crash-reporter-id a1a80079-964e-4eb3-ac19-4d5d91cdb616
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
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsdeactivate2:31505458
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_c_966_ss:31454199
inlinechat_v2_hd992725:31505030
4je02754:31466945
8hhj4413:31478653
38bie571_auto:31426784
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
chat:31457767
7e187181:31503455
ghj88844:31499326
ec1eg703:31520046
ddid_c:31478207
hmra_i5g22:31518061
getcmakediagnosticsoff:31489825
7df3h592:31512476
cp_cls_t_1082:31516087
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_c_632:31517842
b1ei0813:31506238
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
31fi7170_t:31522396
jh5f2457_c:31515489
nes-gb-6k:31521375

Metadata

Metadata

Assignees

No one assigned

    Labels

    C#DKThe C#DK extension is installeduntriaged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions