Thomas Ardal

Entrepreneur and founder of

Sharing R# Live Templates With Your Team

I found myself repeatable adding the same Live Template to R# over and over again: The unit-test template. This template adds a method with a method name starting with Can as well as the arrange/act/assert comments, which I’m pretty much in love with. Each time I re-install my old machine or simply get a new one, this is the first template I import. The other day I wanted to share this template with my team-members, but wanted to do something else than just exporting the template and sharing it by mail. It turns out that R# have a great feature to share stuff between team members. I already use this to share R# settings, as well as StyleCop settings (which is available as a R# plugin). The sharing feature also supports live templates, which I was not aware of.

To share your live templates with your team members, navigate to the Templates Explorer in the ReSharper menu inside Visual Studio. On my machine, the This computer layer was selected as shown here:


Select the test-template and export it by clicking the Export-icon. Change the layer to Solution ‘Your SLN’ team-shared and import the file. Close Visual Studio to make sure that the DotSettings file is updated. If not already added, add the file named .DotSettings to source control and the live template is shared with your team members, the next time they get that file. Simple and neat, right?

Show Comments