Collection of Resharper Templates (Live Templates and File Templates) to help when writing (mainly C#) code.
To import a .DotSettings
templates file into Resharper:
- Open Visual Studio
- Select drop down menu: Extensions -> Resharper -> Tools -> Templates Explorer
- In the Templates Explorer select the Live Templates or File Templates tab depending on what kind of template you want to import
- Select the C# scope (on the left)
- Click on the "Import" toolbox button and select the
.DotSettings
file
C# Live Templates for unit testing include:
- NUnit (shortcuts start with
nunit
) - MSTest (shortcuts start with
mstest
) - xUnit (shortcuts start with
xunit
)
Other C# Live Templates include:
- Specflow (shortcuts start with
specflow
) - Builder (shortcuts start with
builder
) - Simple Factory (shortcuts start with
factory
) - log4net (shortcuts start with
log4net
) - Override (shortcuts start with
override
) - ToString
Other templates include:
- Markdown (accessible only in
*.md
files) - Cake (accessible only in
*.cake
files) - .NET XML documentation (shortcuts start with
xmldoc
)
To insert a live template simply start typing its shortcut in your C# file (or press Ctrl+J
or Ctrl+E, L
to bring up the inline menu).
C# file templates include:
- Assembly info file
- Builder class
- Exception class
- NUnit class
- Simple Factory class
- xUnit class
Other file templates include:
- JSON file
- Markdown file
- Nuspec file
- Text file
- XML file
To choose from the list of file templates press Ctrl+Alt+Insert
.
To place a new file from a file template in a particular place in Solution Explorer:
- Select in Solution Explorer where you want the file to be placed
- Press
Alt+Insert
- Select the file template from the inline menu