C# Dev Kit Extended adds a NuGet package manager for projects and solutions, a .NET publish command, and several editor helpers for working with C# projects in Visual Studio Code.
Command Palette, C# Package Management context submenu (on .csproj, .sln and .slnx files, project folders, and projects and solutions in Solution Explorer)
Opens the visual NuGet package manager for a project or a whole solution. Multi-target projects are shown per target framework; in a solution, packages are grouped by project and can be installed, updated or removed in several projects at once.
.NET: Publish To...
Command Palette, context menu of .csproj files, project folders and projects in Solution Explorer (next to C# Dev Kit Publish)
Publishes a project. Targets: Default (runs C# Dev Kit Publish), folder, NuGet.org, SSH server.
Run Powershell Script
Context menu of a .ps1 file
Runs the PowerShell script.
// Comment Selection, \\ Uncomment Selection
Editor context menu (any language)
Comments or uncomments the selected lines.
Automatic features
New file template. A new empty .cs file is filled with a type template. The namespace is taken from the nearest file above it in the folder tree (plus the intermediate folders), or built from the folder path inside the workspace folder. A file in the workspace root gets no namespace.
File and type name sync. When you rename the only top-level type in a file, the file is renamed on save. When you rename the file, the type is renamed. Files with several top-level types are skipped.
Unused using removal. Unused using directives are removed when you save the active file manually (Ctrl+S).
Virtual indentation. When the caret is on an empty line, it is shown at the indentation of the surrounding code without changing the file. The indentation (tabs or spaces, as in the file) is inserted when you start typing. Works in any language.
Settings
All settings are enabled by default.
Setting
Default
Description
csharp-extended.newFileTemplate
true
Fill new empty .cs files with a type template.
csharp-extended.syncFileAndTypeNames
true
Keep the file name and its single top-level type name in sync.
csharp-extended.removeUnusedUsingsOnSave
true
Remove unused using directives on manual save.
csharp-extended.virtualIndent
true
Show the caret at the expected indentation on empty lines and insert it when you start typing.
Requirements
The C# or C# Dev Kit extension: renaming, symbols, and code actions come from it.
The .NET SDK.
.NET: Publish To... and Run Powershell Script work on Windows only (Windows PowerShell).
Publishing to an SSH server needs the OpenSSH client (ssh and scp) and key-based access to the server.
Credits
The NuGet package manager UI is based on the visual-nuget extension.