# C# Editor

Build .sln and C# projects without full Visual Studio 2022 Community. Solution explorer, build, rebuild, clean, run, and restore — all from VS Code.

## Features

### Build & Run
- **Build Solution** – Build entire .sln with `dotnet build`
- **Build Project** – Build current .csproj (from active file or selection)
- **Clean Solution** – Clean output folders
- **Rebuild Solution** – Clean and build
- **Run Project** – Run current project in terminal (`dotnet run`)
- **Restore Packages** – Restore NuGet packages

### Views (sidebar)
- **Solutions** – List solutions in workspace
- **Projects** – Project overview
- **References** – References panel
- **Build Output** – Build log
- **File Structure** – File structure for C# files

### Editor
- **Code Lens** – Toggle C# code lens (references, tests)
- **File Structure** – Inline type/class indicators
- **Status Bar** – Quick access to C# Editor panel

## Commands

| Command | Shortcut |
|--------|----------|
| Build Solution | `Ctrl+Shift+B` (Mac: `Cmd+Shift+B`) |
| Show Solutions | `Alt+S` |
| Build Project | (context menu on .cs / .csproj) |
| Clean Solution | Command Palette |
| Rebuild Solution | Command Palette |
| Run Project | Command Palette |
| Restore Packages | Command Palette |
| Toggle C# Code Lens | Command Palette |

## Configuration

Search for **C# Editor** in VS Code Settings:

```json
{
  "csharpEditor.build.autosave": true,
  "csharpEditor.build.verbosity": "minimal",
  "csharpEditor.dotnetPath": "",
  "csharpEditor.msbuildPath": "",
  "csharpEditor.codeLens.enabled": true,
  "csharpEditor.statusBar.enabled": true,
  "csharpEditor.fileStructure.enabled": true
}
```

- **dotnetPath**: Path to `dotnet` CLI (empty = use PATH). Required for build/run.
- **msbuildPath**: Optional; leave empty to use `dotnet msbuild`.

## Requirements

- VS Code 1.75+
- .NET SDK (for `dotnet build` / `dotnet run`) — no full Visual Studio 2022 required

**Note:** If the extension icon does not appear in the gallery, copy `logo.png` from another extension folder (e.g. GitLens-TurboCharged) into `CSharp-Editor`.

## Theme

**C# Editor Dark** – Dark theme optimized for C# (select in Color Theme picker).

## Changelog

### 2.0.0
- Initial release
- Build solution/project without full VS 2022
- PowerShell and Node initialization support
- Solution explorer views, status bar, code lens, file structure

## License

MIT
