Previous slide
Next slide
Toggle fullscreen
Open presenter view
Introduction to Visual Studio
Overview
Visual Studio
An IDE (Integrated development environment) by Microsoft for Windows
Used for C#, C++, etc
There's a free Community edition
Multiple versions released
First version: 1997
2017, 2019, 2022...
Not to be confused with
Visual Studio Code
, a separate code editor by Microsoft
Features
Debug tools
Build tools
IntelliSense
code completion aid
automatic code generation
GitHub Copilot
and
IntelliCode
, AI-assisted code development in VS
Git integration
Testing tools
Profiling and diagnostics tools
Projects and solutions
In Visual Studio, there are two key concepts,
projects
and
solutions
Here's Microsoft's documents for
what they are
and
how to create them
A
project
contains all files that are compiled into an executable application
Source code, images, data files, etc
Compiler settings, configuration files
In C#, handled by the project file
.csproj
by
MSBuild
Creating a new project
A
solution
contains one or multiple projects
Build information, Visual Studio window settings
Files that aren't associated with a particular project
.sln
is the solution file,
.suo
contains Solution User Options
Visual Studio UI
Default view in Visual Studio consists of three panels.
Code editor
Solution Explorer
(
CTRL+ALT+L
) shows the files in the project
Terminal
(
CTRL+Ö
) for entering command line commands (e.g., for using Git)
Moving windows around
Drag and hold windows to move them around
Snap to layout
window appears
After moving a window to the right, you can pin it to see its title on the right
Keyboard shortcuts
CTRL+.
If a type is missing, use this to add the needed using directive
CTRL+R
, then
CTRL+R
(seriously?)
Rename variable
Press Enter to confirm
CTRL+C
(without selecting), then
CTRL+V
Duplicate line
ALT+Up
,
ALT+Down
Move line up/down
Visual Studio Default keyboard shortcuts
Gotchas
Some actions are unavailable when your app is running
Deleting files
Adding new controllers
Reading
Visual Studio Documentation: Overview
Visual Studio tutorials | C#
Tutorial: Create a .NET console application using Visual Studio