# Install .NET 6.0 SDK - Complete Guide

## 📥 Download .NET 6.0 SDK

### **Step 1: Buka Browser**

Go to: https://dotnet.microsoft.com/download/dotnet/6.0

### **Step 2: Download Installer**

Pilih sesuai OS Anda:

| OS | Download |
|----|----------|
| **Windows 64-bit** | dotnet-sdk-6.0.x-win-x64.exe |
| **Windows 32-bit** | dotnet-sdk-6.0.x-win-x86.exe |

**Recommendation:** Gunakan **64-bit** (lebih standar di 2026)

---

## 🔧 Instalasi

### **Step 1: Double-click Installer**

- Cari file yang di-download (biasanya di `C:\Users\[YourName]\Downloads\`)
- Double-click file `.exe`

### **Step 2: Follow Wizard**

```
┌─────────────────────────────────┐
│ .NET 6.0 SDK Setup Wizard       │
├─────────────────────────────────┤
│                                 │
│ ☐ I agree to the terms...     │
│                                 │
│  [Install]  [Cancel]            │
└─────────────────────────────────┘
```

- Centang checkbox "I agree"
- Click **Install**
- Follow prompts

### **Step 3: Wait for Installation**

```
Installing...
███████████████░░░░░░░  50%
```

**Typical duration:** 2-5 minutes

### **Step 4: Restart Computer (if prompted)**

Jika diminta, restart computer Anda.

---

## ✅ Verifikasi Instalasi

### **Buka Command Prompt/PowerShell**

```bash
# Check version
dotnet --version

# Should show: 6.0.x (or higher)
```

**Expected Output:**
```
6.0.27
```

### **Lihat semua .NET yang terinstall**

```bash
dotnet --list-sdks
```

**Expected Output:**
```
6.0.27 [C:\Program Files\dotnet\sdk\6.0.27]
```

---

## 🌐 Offline Installation (jika tidak ada internet)

### **Download Full Installer**

1. Go to: https://dotnet.microsoft.com/download/dotnet/6.0
2. Cari **"Installers"** section
3. Download **"Runtime + SDK Combined"** (Installer size ~200MB)

### **Run Offline**

Double-click installer, cara sama seperti di atas.

---

## 🔍 Cek Lokasi Instalasi

.NET SDK biasanya terinstall di:

```
C:\Program Files\dotnet\
```

Check dengan:
```bash
where dotnet
```

**Output:**
```
C:\Program Files\dotnet\dotnet.exe
```

---

## 🛠️ Troubleshooting

### ❌ "Access Denied" saat install

**Cause:** Tidak punya admin rights

**Fix:**
1. Klik kanan installer
2. Pilih **"Run as administrator"**
3. Click **"Yes"** pada UAC prompt

### ❌ ".NET SDK not found" setelah install

**Cause:** PATH belum di-refresh

**Fix:**
1. Restart Command Prompt/PowerShell
2. Atau restart computer
3. Check ulang: `dotnet --version`

### ❌ "Old .NET version terinstall"

**Current Version:**
```bash
dotnet --version
```

**List all versions:**
```bash
dotnet --list-sdks
```

**To upgrade:**
- Download dan install versi terbaru dari https://dotnet.microsoft.com/download
- Installer akan otomatis upgrade

### ❌ Installation hangs

**Cause:** Internet connection slow

**Fix:**
1. Cancel installer
2. Wait for connection improvement
3. Re-run installer
4. Or download offline installer

---

## 📋 Minimum Requirements

| Requirement | Minimum |
|------------|---------|
| OS | Windows 7 SP1 or later |
| Architecture | x64 or x86 |
| RAM | 512 MB |
| Storage | 1 GB |

**Recommended untuk development:**
- Windows 10/11
- 64-bit
- 2+ GB RAM
- SSD for faster build

---

## 🎯 Setelah Install

Verify sekali lagi:

```bash
# Check SDK installed
dotnet --version

# Check runtime
dotnet --list-runtimes

# Test dengan project baru
dotnet new console -n TestApp
cd TestApp
dotnet run
```

---

## 📦 Apa yang Terinstall dengan .NET 6.0 SDK?

1. **SDK** - Tools untuk develop & build
2. **Runtime** - Untuk run .NET apps
3. **CLI** - Command-line tools (`dotnet` command)
4. **ASP.NET Core** - Web framework (optional, sudah included)

---

## 🔗 Useful Links

- **Official Download:** https://dotnet.microsoft.com/download/dotnet/6.0
- **Documentation:** https://docs.microsoft.com/en-us/dotnet/
- **Version History:** https://dotnet.microsoft.com/en-us/download/dotnet/6.0/release-notes

---

## ✨ Next Steps

Setelah .NET SDK terinstall:

```bash
# 1. Build PCMonitorAgent
cd E:\xampp\htdocs\tracker\agent-csharp
BUILD.bat

# 2. Install service
INSTALL_SIMPLE.bat
```

---

**Created:** 2026-03-27  
**Target Version:** .NET 6.0 LTS  
**Support Until:** November 2024 (extended until November 2026)
