Skip to content
| Marketplace
Sign in
Visual Studio Code>Extension Packs>dotnet new class/interface extensionNew to Visual Studio Code? Get it now.
dotnet new class/interface extension

dotnet new class/interface extension

Pad

|
19 installs
| (0) | Free
Create class or interface according to the folder structure
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

dotnet new extended

A simple Extention for dotnet new class/interface -n <NAME> -o <DIRECTORY> but with correct namespaces according to the folder hierarchy

Basic dotnet

# Projectname : TestProject
dotnet new class -n TestClass -o TestFolder

With this command you'll create a Class in TestProject/TestFolder/TestClass but the Namespace is TestProject

With my Extension

You have to be in the Folder of your csharp Project. It doesn't matter in which folder.

Hit CTLR + SHIFT + P and type dotnet new

Now you can create your class or your interface

  • MyModel
  • MyModel/TestModel
  • MyModel/Deeper/DeepTestModel
  • MyInterface
  • MyIntercace/IMyInterface

Then you can select in the prompt wheather you want to create an interface or a class. Hit ENTER and your class will be created.

Pictures

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

Disclaimer

This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.

Use this extension at your own risk. The author takes no responsibility for any potential issues, data loss, or damages caused by using this software.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft