VS Code in the Visual Studio Marketplace
Unlike Visual Studio 2019, VS Code always shows extensions from the Visual Studio Marketplace. Searching for extensions is much like using the Online window or Gallery tab in Visual Studio 2019. Type your search criteria in the search box, select an extension to view the details, and if you like it click Install.
Creating an extension
What happens when you search and search but you still can't find the extension you want? Well, we are developers, after all, so let's just write our own! Everything we need to create an extension is available in a couple of npm packages all ready for us.
Generating a basic extension
Let's create an extension that inserts a licensing header at the top of an open document, as follows:
- To get started, we will need to install the
yo
andgenerator_code
npm packages. Theyo
package is a code scaffolder, which creates a basic project for us. Thegenerator_code
package contains the templates...