JetBrains Rider Live Templates

Someone today during my talk on TDD for Blazor on a JetBrains Webinar asked me for what live templates I was using.


What are Live Templates?

Live templates are ways of quickly adding code. Usually you have 1-5 characters you type and then you hit “tab” and it will generate you lots more code. Sometimes these are called “snippets.”

If you want to see me using one from the webinar today check this out at around the 44:08 mark.


What Live Templates do I have?

I have four Live Templates related to testing:

  • xf which generates an xUnit Fact without async
  • xfa which generates an async xUnit Fact
  • xt which generates an xUnit Theory without async
  • xta which generates async xUnit Theory

To add these to JetBrains Rider, you can open up your settings, go under Live Templates, then C#, and then you can add a new live template. Here are the settings.


xf for adding an xUnit Fact without async

Note: the words between $$ means your cursor will end up there and you can tab your way through those.


xfa for adding an async xUnit Fact


xt for adding an xUnit Theory without async


xta for adding an async xUnit Theory

2 thoughts on “JetBrains Rider Live Templates

  1. We offered best Devops training in hyderabad.In my extensive experience with digital transformation and DevOps, the essence lies not just in the end goal but the entire journey. Despite the surge in demand for “DevOps Engineers,” organizations often struggle to cultivate a true DevOps mindset. Donovan Brown defines DevOps as the “union of People, Process, and Products” for continuous value delivery. Our approach at the Microsoft Business Group starts with a 5 to 10-day DevOps Assessment, revealing common challenges like siloed teams and a perpetual firefighting mode. The remedy isn’t a specific tool but a focus on people and processes alongside the right tooling. While we proceed with DevOps jumpstart engagements, emphasizing sustainable change, success lies in aligning people, processes, and tools for a holistic transformation. Reach out for more information and access to our offerings.

Leave a Reply