Przemysław Lunic
Przemysław Lunic

Reputation: 393

VS code right click menu new class c#

I'm currently following some tutorial I bought which refers to 2 options called "New C# class / New C# Interface", while I'm only seeing "New file."

I'm new to VSCODE and installed only C# from OmniSharp.

I'd like to have "New C# class" and "New C# Interface" in this menu as well.

enter image description here

Upvotes: 31

Views: 59830

Answers (5)

R M
R M

Reputation: 71

Since the good old "C# Extensions" by jchannon is deprecated, I found out that there is a new Official C# extension from Microsoft called C# Dev Kit and it works fine. It basically does everything needed to create a new C# class, etc.

Upvotes: 7

Murat Seker
Murat Seker

Reputation: 916

Another extension with the same name (C# Extensions) was published by "JosKreativ" which can be an alternative.

enter image description here

Upvotes: 3

Luke
Luke

Reputation: 1039

The "C# Extensions" extension from maccettura's answer is no longer maintained (per comment on that answer). However, there is a fork of that extension that is actively maintained at time of writing.

Github repo for fork

Extensions Marketplace

Upvotes: 4

Jabba
Jabba

Reputation: 20634

It seems "C# Extensions" is no longer maintained. I tried it and it was not reliable. Sometimes it worked, sometimes it didn't.

But there is a similar extension called "VS Sharper for C#", see here.

Upvotes: 16

maccettura
maccettura

Reputation: 10818

If you want those options in your right click menu, then you need to install the "C# Extensions" extension from the marketplace.

The link is here

Keep in mind this is just a shortcut extension, it is not actually required.

You can simply choose new file and give it the .cs extension if you want a new C# file.

Upvotes: 40

Related Questions