If you need more control on how the code for your views or controllers is scaffolded, you need to create a new scaffolding extension for Visual Studio. This extensibility enables developers to add their own scaffolding items to the Add Scaffold dialog window, as illustrated in the following screenshot:
To create such a custom scaffolder, we'll create a new basic scaffolder project. This project template is installed by the SideWaffle extension and adds all the files necessary to create a custom scaffolder.
Perform the following steps to create your own custom scaffolder project:
Create a new project inside Visual Studio.
Select the Basic Scaffolder project template by navigating to Extensibility | SideWaffle, as shown in the following screenshot:
The project template will create two new projects: BootstrapBasicForm and BootstrapBasicFormExtension. One contains the code for the extension and another contains the
.vsixmanifest
file for the project:Open the...