01. Visual Studio Setup and Essentials
Level: Beginner
- Download and install Visual Studio Community free
- Configure for .NET and ASP.NET development
- Create your first Console or Web project
- Navigate solution structure and file organization
- Essential extensions and settings
- Set up SMS (School Management System) project
Download and Install
Visual Studio Community is free for personal, student, and open-source use. It's the IDE most .NET developers use daily.
Visit: https://visualstudio.microsoft.com/downloads/
Choose: Visual Studio Community (latest version)
Installation Steps
- Download installer (small ~5MB)
- Run installer
- Select ".NET desktop development" workload
- Choose install location
- Click Install (20-30 minutes)
✓ .NET desktop development
✓ ASP.NET and web development
✓ Azure development
First Project
Create Console App for School Management:
- Open Visual Studio
- Create Project → Console App (.NET)
- Name:
SMS.Core - Location:
C:\NexCoding\Projects\ - Framework: .NET 8
- Click Create
Project structure appears:
SMS.Core/
├── Program.cs
├── SMS.Core.csproj
└── bin/obj/
Project Configuration
Open SMS.Core.csproj (right-click → Edit):
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>SMS</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
Key settings:
TargetFramework: Which .NET versionRootNamespace: Default namespace (SMS)ImplicitUsings: Auto-import common namespacesNullable: Strict null-safety
Essential Extensions
Install via Extensions → Manage Extensions:
Code Quality:
- Prettier Code Formatter — Auto-format code
- Visual Studio IntelliCode — AI code suggestions
- Roslynator — Code analysis
Productivity:
- Productivity Power Tools — File nesting, git tools
- REST Client — Test APIs inline
- NuGet Package Explorer — Browse packages
Testing:
- NUnit 3 Test Adapter — Run NUnit tests
- xUnit.net — xUnit test support
Search extensions in sidebar or use shortcut: Ctrl + Shift + X
Code Snippets - SMS Examples
Simple Student Controller Stub
Type propfull + Tab:
private string _rollNumber;
public string RollNumber
{
get { return _rollNumber; }
set { _rollNumber = value; }
}
Auto-Property (Shorthand)
Type prop + Tab:
public string Name { get; set; }
Creating Custom Snippet
File → Export Template → ItemTemplate → Choose Class
Customize and reuse for SMS entities (Student, Teacher, Exam, etc.)
IntelliSense Features
Press Ctrl + Space while typing:
// Type: Student.
// IntelliSense shows:
- RollNumber { get; set; }
- Name { get; set; }
- Status { get; set; }
Press Ctrl + Shift + Space for parameter hints.
Solution Structure for SMS
Organized project layout:
SMS/
├── SMS.Core/ # Business logic
│ ├── Models/
│ │ ├── Student.cs
│ │ ├── Teacher.cs
│ │ ├── Exam.cs
│ │ └── FeeAccount.cs
│ ├── Services/
│ │ ├── StudentService.cs
│ │ ├── ExamService.cs
│ │ └── FeeService.cs
│ └── Program.cs
├── SMS.Data/ # Database
│ ├── Context/
│ │ └── SmsDbContext.cs
│ └── Migrations/
├── SMS.Api/ # ASP.NET Core API
│ ├── Controllers/
│ │ ├── StudentsController.cs
│ │ ├── ExamsController.cs
│ │ └── FeesController.cs
│ └── Program.cs
└── SMS.sln # Solution file
Key Shortcuts
| Shortcut | Action |
|---|---|
Ctrl + K, Ctrl + C | Comment selection |
Ctrl + K, Ctrl + U | Uncomment selection |
Ctrl + F5 | Run without debugging |
F5 | Run with debugging |
Ctrl + Shift + B | Build solution |
Ctrl + . | Quick actions & refactoring |
Alt + Enter | Show suggested fixes |
Debugging Essentials
Set breakpoint: Click left margin or F9
Watch variables:
- Debug → Windows → Watch
- Type variable name:
student.RollNumber - See value during execution
Step through code:
- F10 — Step over (execute line)
- F11 — Step into (enter function)
- Shift + F11 — Step out (exit function)
NuGet Package Management
Install packages for SMS:
- Tools → NuGet Package Manager → Package Manager Console
- Command:
Install-Package Dapper
Or right-click project → Manage NuGet Packages → Browse
Common SMS packages:
- Dapper — Micro-ORM
- Entity Framework Core — ORM
- Newtonsoft.Json — JSON handling
- Serilog — Logging
- FluentValidation — Input validation
Key Takeaways
- Visual Studio Community = free, powerful IDE
- Workloads = modular installation (only install what you need)
- Projects organized by domain (Core, Data, Api)
- IntelliSense = smart code completion
- Debugging = essential skill (breakpoints, watch, step)
- Extensions = productivity boosters
Create solution templates. Right-click project → Export Template. Reuse same structure for future SMS projects.
- .NET not installed — Install .NET SDK from dotnet.microsoft.com
- Extensions conflict — Disable conflicting extensions
- Slow IntelliSense — Disable unused extensions, restart VS
- Out of memory — Increase available RAM or close unused projects
Use ChatGPT, Claude, or Copilot to go deeper on Visual Studio Setup. Try these prompts:
"How do I install Visual Studio Community?""What workloads do I need for .NET?""How do I debug an application?""Quiz me on Visual Studio"
💡 Tip: After reading this article, paste your own code into AI and ask "What could go wrong here and why?" — fastest way to find edge cases and deepen understanding.