C# Editor Showdown

C# Editor Showdown

Choosing the right editor is pivotal to a productive and effective C# developer. But which editor to use? In this post I compare JetBrains Rider, Visual Studio, and VS Code. VS Code, known for its lightweight nature and extensive extension marketplace, offers a flexible and customizable coding environment. Visual Studio provides a robust, feature-rich platform that has long been a favorite among .NET developers. JetBrains Rider encapsulates a blend of ReSharper features and IntelliJ user-friendly interface and is dedicated to C# development performance and functionality.

I have created a sample repository to go along with this post: csharp-ide-showdown. There are baseline and final branches for each editor, respectively. You will notice a few more commits in final-vscode due to how and whether features were implemented.

Configuration

I used the following configurations. I intentionally restricted VS Code extensions to the Microsoft contributed C# Dev Kit. The reason I limited the comparison to that is I believe the intent is to make the C# Dev Kit extension as feature rich as Rider or ReSharper. Thus the comparison is much more indicative of where Microsoft stands with VS Code and C# development today.

VS Code Visual Studio Rider
C# Dev Kit ReSharper No plug-ins

Comparison

For me the following tasks are the minimum I need to be effective as a software engineer. If something you depend on is not in the comparison, feel free to hit me up and I'll try to take a look.

Open Solution

VS Code Visual Studio Rider
Opens folders Opens folders or solution Opens folders or solution
"Solution Explorer" tool window "Solution Explorer" tool window "Solution" tool window

Code Cleanup

VS Code lags behind in terms of Code Cleanup. If I have a whole bunch of files with formatting issues (e.g., indentation) then VS Code will require me to fix each case one by one.

Both Visual Studio and Rider have all the options I need for such situations. Both reformatted Ordr.cs perfectly, although Rider was noticeably faster even in a tiny solution like this.

Rider reformatted .editorconfig which you may find an positive; I'd rather it have left that alone.

VS Code Visual Studio Rider
Reformat file Reformat file Reformat file
Reformat multiple Reformat multiple
Syntax Syntax
Imports Imports
Rearrange Rearrange
Optimizations Optimizations

Code Actions

VS Code lags behind in terms of Code Actions. If I have a whole bunch of files with code issues (e.g., redundant using statements) then VS Code will require me to fix each case one by one.

Both Visual Studio and Rider have all the options I need for such situations.

VS Code Visual Studio Rider
Single action Single action Single action
Class action Class action
File action File action
Solution action Solution action

Refactor

VS Code Visual Studio Rider
Rename symbol only Rename symbol and file Rename symbol and file
Move type to file Move type to file Move type to file
Change signature Change signature

Both Visual Studio and Rider indicated the misspelled Ordr class, and renamed both the class and the file.

Find

VS Code Visual Studio Rider
Search everywhere Search everywhere Search everywhere
Find references Find usages Find usages

Manage NuGet Packages

VS Code Visual Studio Rider
Project Project
Solution Solution

Unit Testing

VS Code Visual Studio Rider
Run/debug method Run/debug method Run/debug method
Run/debug class Run/debug class Run/debug class
Run/debug project Run/debug project Run/debug project
Run/debug solution Run/debug solution Run/debug solution
Coverage report Coverage report
Coverage inline Coverage inline

Conclusion

I wrote this post for C# developer productivity. So no punches held here, just the facts. Rider is the clear winner of this showdown, followed by a close second to Visual Studio (when coupled with ReSharper). VS Code is a workable option but lacks most of the features the other two have.

Features are a critical component when deciding which editor to use, but not the only consideration. Current productivity is a major consideration: if a developer is productive and prefers VS Code then that is what they should use. As a lead developer I maintain all three, because I need to be able to support a team of developers using multiple tools.

Lastly, VS Code deserves to be highlighted as an incredibly fast and clean editor. I often use it when I want to avoid the overhead of loading a large solution. That said, Rider is real close to the speed and lightweight-ness of VS Code.

In the end I hope this post motivated you to explore. It can only benefit you.

Code well, and shape the future.

Resources