1. Introduction
In C# development, your code is never just a random pile of files like in your "Downloads" folder. Everything is always grouped into projects. A project is a special container that holds your code files, settings, references to third-party libraries, and other important stuff. When you run your program or build it into an executable, it's the project that takes care of putting it all together.
A project lives inside a Solution, and you can have several projects in one solution (for example, your main app project + a separate project for tests).
2. Step-by-step: Creating a New Project in Rider
Step 1. Creating the Project
On the start screen, hit the big blue "New Solution" button.
You'll see a window with template choices. To get started, we're gonna create a "Console Application" in C#. This is perfect for practice, since you don't have to worry about UI or web server stuff right away—just you, your code, and the console.
On the right, fill in the project details:
- Solution Name: a name for your "container". Call it MyConsoleApp.
- Project Name: the name of the actual project. Rider will suggest the same name, and that's totally fine for us.
- Location: where on your drive your code will live.
- Framework: pick the latest .NET version here. If you don't have the right .NET SDK installed, Rider will notice and offer to download and install it for you—just confirm it.
- Language: C#
- Do not use top-level statements: this is super important for us! Make sure to check this box.
When you're all set, hit the blue Create button.
Once Rider creates your project, we'll write some code using the classic C# program structure. Don't freak out about new words like namespace, class, and Main—these are the standard "building blocks" of any console app.
Windows Defender Notification. Your antivirus might slow down Rider by scanning its files. To speed things up, the IDE will ask you to add its folders to exceptions. Go ahead and allow this in the dialog box.
3. Getting Around the Project Structure
Before we start coding, check out the left side of the screen—this is the Solution Explorer window. It works like a file explorer, but instead of just showing files, it gives you a logical view of your app's structure. At first, there are only a few items here, but it's important to know what each one means.
MyConsoleApp(top level) - this is your Solution, the "container" we talked about.MyConsoleApp(nested, with the C# icon) - this is your Project. This is where all the files for your program live.Dependencies- this is like your app's ingredient list. Later, when you add third-party libraries, they'll show up here.Program.cs- the main file. This is a text file with your C# code.
What you see in Solution Explorer is a handy logical view. On disk, in your project folder, the physical structure is a bit more complicated, but it's good to know how it looks. Here's what it looks like if you pick the Files tab:
4. Running Your Code
Run your project: click the green ▶️ Run button (usually at the top left—if you can't find it, try the Run → Run 'MyConsoleApp' menu).
If everything went well, you'll see a Run tab at the bottom. You'll see that your program ran, printed some text, and finished successfully. Process finished with exit code 0—that's your program's final report, and it means: "Mission accomplished, no errors!"
You might notice that the code looks different from what you're used to in lectures and exercises. That's because in lectures, for simplicity, we often use Top-level statements—the ability to write code directly. Here, we're seeing the classic, full C# program structure, and that's what almost all real-world apps look like.
We'll break down each of these "building blocks" in detail a bit later.
5. Rider Hotkeys
Real-time code analysis and error checking.
Rider checks your code as you type. If you make a mistake, like a typo in a variable name, it'll underline it with a red squiggly line, and if you hover your mouse, it'll suggest fixes.
Autocomplete Windows/Linux: Ctrl+Space | macOS: ⌃Space
When you start typing a class or method name, like Con..., Rider suggests completions like Console. This not only speeds up typing, but also helps you avoid typos.
Context actions Windows/Linux: Alt+Enter | macOS: ⌥Enter
This is one of the most powerful features. Put your cursor on any word in the code and hit this combo. Rider will offer actions that fit the situation: from simplifying code and fixing errors to generating constructors.
Go to definition Windows/Linux: Ctrl+Click or F12 | macOS: ⌘Click or F12
To quickly jump to where a variable or method is declared, hold Ctrl (or ⌘ on Mac) and click its name. Rider will instantly take you to the right line.
Safe rename Windows/Linux: Ctrl+R | macOS: ⌘+R
If you need to rename a variable or method, don't do it by hand. Put your cursor on the name, hit the combo, and Rider will find all its uses in the project and update them safely.
Commenting code Windows/Linux: Ctrl+/ | macOS: ⌘/
If you want to temporarily "turn off" a line or block of code without deleting it, select the part you want and hit the combo. Hit it again to uncomment.
Auto-formatting code Windows/Linux: Ctrl+Alt+L | macOS: ⌥⌘L
If your code's indentation is messed up and it's hard to read, just hit this combo and the whole file will be formatted perfectly according to the standards.
This is the basic toolkit that makes development way easier. You can find the full list of keyboard shortcuts in the official docs. Or in Rider, open Main Menu | Help | Keyboard Shortcuts PDF
6. Practical Tips and Common Mistakes
Every developer, from intern to senior, runs into errors every day. That's totally normal. The main thing is not to be afraid of them, but to know how to read and fix them.
- Project won't compile: maybe you didn't pick the right .NET version or accidentally renamed an important file. Check in Solution Explorer that your structure matches what you expect.
- No run button: sometimes Rider wants you to manually pick which project to run. Right-click your project and choose Set as Startup Project.
- bin and obj folders are empty or missing: they'll show up only after your first successful build (Run or Build).
- “.NET SDK not found” error: usually this means .NET isn't installed or Rider can't find it. Go to the link, download the SDK from here: official .NET page and reinstall.
GO TO FULL VERSION