.cs, .csx) through csharp-ls and F# (.fs, .fsi, .fsx) through FsAutoComplete. Both are installed as .NET tools, and both debug with netcoredbg. Builds, NuGet packages and tests go through the dotnet CLI. For other languages, see the support matrix.
Language server
The server loads the solution or project it finds from these markers. FsAutoComplete starts with
AutomaticWorkspaceInit on, so it loads the projects without waiting for the editor to ask.
When you go to the definition of a library type, csharp-ls returns decompiled source. It opens as a read-only document, and so does source-generated code.
ProjectSettings/ProjectVersion.txt is there so that Unity projects work too. See Unity for using OpenIDEA as Unity’s external editor.
Setup
You need the .NET SDK withdotnet on your PATH. The IDE runs every build, test and package command through it, and installs the language servers with it.
When a server is missing, opening a C# or F# file shows a “csharp-ls is not installed” (or FsAutoComplete) notification with Install. You can also install the tools from Settings › Languages & Frameworks › Language Servers.
A
csharp-ls, fsautocomplete or netcoredbg already on your PATH (for example a global dotnet tool install --global csharp-ls) is used as is.
The .NET tool window
The .NET tool window (on the right) works with the.csproj, .fsproj and .vbproj projects in the project folder, including the projects listed in .sln and .slnx solutions and their project references. Open it with the .NET Workspace action from Find Action… (⌘⇧A / Ctrl+Shift+A). Reload .NET Workspace scans the folder again.
For the selected project you can:
- Pick the Configuration (
Debugby default) and Target framework (for multi-targeted projects). - Build, Restore and Clean it (also available as the Build .NET Project, Restore .NET Project and Clean .NET Project actions). Output appears in the Output section.
- Browse its NuGet packages, including transitive ones, search your package sources with Search NuGet packages (
dotnet package search), and add, update or remove packages (dotnet add package/dotnet remove package). - See its Project references.
- Discover and run tests (see below).
Run
OpenIDEA creates run configurations for every.csproj it finds (also through .sln / .slnx) whose output type is Exe or WinExe, or that uses Microsoft.NET.Sdk.Web:
- <Project> (.NET Project):
dotnet run --project <path> --no-launch-profile. - <Project>: <profile>: one per profile in
Properties/launchSettings.json, run with--launch-profile. The profile’s environment variables, working directory, command-line arguments andapplicationUrl(asASPNETCORE_URLS) are applied.
Tests
Projects that referenceMicrosoft.NET.Test.Sdk, MSTest, NUnit or xUnit, or set IsTestProject, are test projects. Each gets a dotnet test (<Project>) configuration.
- In the editor, test methods marked
[Fact],[Theory],[Test],[TestCase],[TestCaseSource],[TestMethod]or[DataTestMethod]get gutter run icons. - In the .NET tool window, Discover .NET Tests lists the tests (
dotnet test --list-tests), and you can run all of them or one.
Microsoft.Testing.Extensions.TrxReport package for that; Install TRX reporting adds it in the version matching the project’s testing platform.
See Testing for the test tree and rerunning failed tests.
Debugging
Running a .NET Project configuration with Debug builds the project, asks MSBuild for its output assembly (TargetPath, in the Debug configuration) and launches it under netcoredbg. If netcoredbg is missing, a notification offers to install it.
See Debugging.
Limitations
- Automatic run configurations are created only for C# projects (
.csproj). F# and VB projects can be built and tested from the .NET tool window, but you create their run configurations yourself. - Test configurations run without a debugger; there is no Debug action for .NET tests.
- There is no Visual Basic language server.
- netcoredbg has no prebuilt download for Windows on Arm.
- There is no designer for WinForms, WPF or XAML.