Manage .NET (C#) solutions, projects, and files
As Fleet supports a lot of different languages and technologies, it does not have a universal concept of a project, instead it operates with workspaces, where a workspace is a directory that contains everything associated with your current development task.
On the other hand, C# code is normally organized in projects and solutions, with corresponding configuration files (.csproj and .sln).
Work with solutions in a dedicated view
Im most cases when you work with C# code, you need to see code items organized in projects and solutions, which is the way you see code structure in traditional .NET IDEs like Visual Studio and JetBrains Rider.
JetBrains Fleet also lets you work with the solution structure — as soon as you enable Smart Mode in a workspace that contains a .NET solution, JetBrains Fleet opens the Solution tool.

If the workspace contains a single .sln file, the solution opens automatically, otherwise you can choose what solution to open.
Manage .NET projects and solutions
To bridge the gap between workspace and project or solution in Fleet, you need to use the directory where the .csproj or .sln file resides as a workspace.
In the current version, Fleet does not have a user interface for creating projects and solutions, but you can use .NET command-line interface (CLI) for that. .NET CLI is included in the .NET SDK, which you should have installed as described in prerequisites.
Create a new project and solution
Press ⌘O or select File | Open from the menu.
In the file browser, navigate to an empty folder where you want to store your code and click Open.
This will open the desired folder as a workspace in the Files view.
Press ⌘⌥T or choose Terminal window.
from the menu to open theMake sure that the command line is in the root of the workspace, and create a new project from a dotnet project template. For example, we can create a new console application
MyConsoleApp
. To do so, type the following in the terminal:dotnet new console -o MyConsoleAppThis command will create a new MyConsoleApp directory and place the project configuration file MyConsoleApp.csproj and an initial source file Program.cs in this directory.
Use the dotnet sln command to create a new solution for your project. Let's call it
FleetTestSolution
. Type the following in the terminal:dotnet new sln --name FleetTestSolutionTo add the project to the solution, type
dotnet sln add MyConsoleAppNow you can switch to the Files view to create and open project files from there.
Open an existing project or solution
Press ⌘O or select File | Open from the menu.
Select the directory that contains the .csproj file of the target project, .sln file of the target solution, or any of its parent directories and click Open.
When you first create or open a project or solution in JetBrains Fleet, you will see its file system structure in the Files view and have basic editor features as well as textual search.
When you enable the Smart Mode, JetBrains Fleet will analyze and index everything included in the solution, and you will be able to see the solution structure in the Solution view and access tons of code intelligence features.
If there are several .sln files in the directory or that you open or its subdirectories, JetBrains Fleet will help you choose the solution you want to work with — after clicking the Smart Mode Status icon on the toolbar, click + in the popup and select the desired solution.

Manage projects and files in your solution
JetBrains Fleet features a minimalistic lightweight user interface, but all project management tasks are easily available either from the terminal or from the editor.
Add a new project to the solution
Press ⌘⌥T or choose Terminal window.
from the menu to open theMake sure that the command line is in the root of the workspace, where the solution's .sln file resides.
Use dotnet project templates to create a project of the desired type.
For example, to create a class library
TestLib
, type the following:dotnet new classlib -o TestLibTo add the new project to the solution, use the
dotnet sln add
command, for example:dotnet sln add TestLib
Add C# files
Do one of the following:
To create a new file in a specific project or folder, select this project or folder in the Solution or Files view and press ⌘N or right-click and select New File.... Then type a filename with the .cs extension and press ↵.
To create a new file next to the file currently opened in the editor, make sure that the focus is in the editor and press ⌘N or select .cs extension and press ↵.
from the menu. Then type a filename with the
Press ← and → to choose the desired template for the new file and then press ↵ to select it.
Add references to other projects within the solution
Use a type from a non-referenced project in your code. For example, if that project declares the class
ArchiveFolder
, you can typevar archiveFolder = new ArchiveFolder();Set the caret to the name of the class, press ⌥↵, and choose Reference project...:
This will add a new project reference and the corresponding
using
directive.
Install NuGet packages
Press ⌘⌥T or choose Terminal window.
from the menu to open theIn the command line, switch to the directory that contains the .csproj file of the target project.
Type the following command:
dotnet add package <package.name>For example, to install the
JetBrains.Annotations
package, v. 2022.1.0 type the following command:dotnet add package JetBrains.Annotations --version 2022.1.0For more information about dotnet CLI, refer to the Microsoft Docs.