You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4.4 KiB
4.4 KiB
marp | paginate | math | theme | title |
---|---|---|---|---|
true | true | mathjax | buutti | 1.5. Introduction to Visual Studio |
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
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