This is a pretty minor annoyance, but I noticed that every time I create a class in Visual Studio there are a few things that I would like to be automatically-generated for me. For instance, all of my classes start with a log4net declaration. It's only one line of code, but it's annoying having to find a class where I declared it in to copy/paste from.
In addition, there are multiple common 'usings' which I use, but that are not created by default.
Is it possible to setup VS to do this?
You just need to edit the default Visual Studio Class template. A walkthrough of the process can be found here.
From the File menu, select "Export Template".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With