Skip to content

JetBrains Rider FAQ

David Cok edited this page Jul 8, 2022 · 9 revisions

Rider for developing Dafny:

Rider is a nice IDE for editing C# code. It has a highlighting editor, debugger, and run configurations analogous to IntelliJ.

You will need at least version 2020.3, as Dafny is built with .NET 5.0 and previous versions of Rider do not support that platform. If you attempt to build with older versions you may hit errors like Package Boogie.ExecutionEngine 2.9.2 is not compatible with netcoreapp5.0. See https://rider-support.jetbrains.com/hc/en-us/articles/360012728920-Support-for-the-NET-SDK-5-0. Update: Dafny is now built with .NET 6.

Why isn't Rider code folding my gigantic files like Resolver.cs?

Dafny has large files. E.g. Translator.cs is close to 20k lines. Rider only runs analyses and folds code up to some file size less than that. To allow Rider to work on such files, follow the advice on this issue. Namely, you need to increase the inspections threshold.

Rider for working with Dafny files:

Although there is no well-maintained Dafny plugin for JetBrains IDEs, it is still possible to get Dafny syntax highlighting on *.dfy files (such as the test files) with the following steps.

  1. Clone the ide-vscode repository as a sibling directory of the dafny repository (or anywhere else you like): https://github.com/dafny-lang/ide-vscode
  2. Open Preferences in Rider (cmd-,)
  3. Go to Editor -> TextMate Bundles
  4. Click the + in the bottom left corner
  5. Select the ide-vscode/syntaxes folder
  6. Save changes