InstallationYou can install this extension from the Visual Studio Marketplace. FunctionalityThis extension adds two new ways to create C# files. Create C# files from the Explorer Context MenuRight clicking a directory now presents a new option: After selecting a template and a filename the templated file will be created in the selected directory: Tip: You can create new subdirectories by including a path seperator ( Create C# files using a shortcutIf you prefer to only use your keyboard, there is also a new shortcut: As any other keybinding in VS Code Since the shortcut can be pressed in different contexts, which workspace, project or directory to use, is not always apparent. Based on the context some or none of the following scenarios might apply: Multiple workspace foldersIf you have opened a workspace with multiple folders, the shortcut will first prompt you to select one of those workspace folders: Multiple project filesIf you are in a workspace folder with multiple project files, the shortcut will prompt you to select one of those projects: If you press the shortcut while focusing a document, the nearest project file to that document will be selected per default. Destination directoryAfter the project directory has been determined you need to select the destination directory of your file: All directories will be displayed in a flat hierarchy. If there are directories with the same name, the relative path to those directories will also be displayed. Available templatesYou can check out all of the available templates here. If you think that an important template is missing, feel free to create a PR that adds it! :) |