One thing I find annoying when creating a new ASP.NET MVC project is that the default templates are not well suited for my needs. You can take the MVC template but then you end up with a lot of extra stuff that you don’t need or you can choose the Empty template but then it is… too empty .
I need to have something in between where I have the minimal set of boilerplate code without all the extra stuff added by the MVC template.
Here is a way how you can do this:
- Start by creating a new ASP.NET project.
- Choose the Empty template from the list of available templates. Click OK.
- Once your new (empty) project is created, right click on the project in the Solution Explorer and choose Add –> New Scaffolded Item…
- Choose MVC 5 Controller – Empty from the list and click on Add.
- After the scaffolding is complete, you have a minimal set of starter code available…
Great tip from a colleague, thanks Koen!