- Build:
msbuild ClaudeCodeExtension.sln /p:Configuration=Releaseormsbuild ClaudeCodeExtension.sln /p:Configuration=Debug - No automated tests: This is a Visual Studio extension; testing is done via F5 debugging in VS 2022
- Debug: Press F5 in Visual Studio to launch experimental instance with
/rootsuffix Exp
- Language: C# targeting .NET Framework 4.7.2 for Visual Studio 2022 SDK
- File Headers: Every
.csfile must include copyright header with author (Daniel Liedke), copyright year (2026), and proprietary usage notice - Namespace: Use
ClaudeCodeVSfor main controls,ClaudeCodeExtensionfor package class - Partial Classes: Main control is split into specialized partial classes (e.g.,
ClaudeCodeControl.Settings.cs,ClaudeCodeControl.Terminal.cs) - Imports: Use explicit
usingstatements; avoid wildcard imports. Common:System,System.Windows,Microsoft.VisualStudio.Shell - Types: Use C# built-in types (
string,bool,double) over BCL types (String,Boolean,Double) - Naming: PascalCase for public members,
_camelCasewith underscore for private fields, camelCase for local variables - Error Handling: Use try-catch with
Debug.WriteLinefor logging; showMessageBoxfor user-facing errors - Comments: XML doc comments (
///) for public members describing purpose; inline comments for complex logic - Settings: Persist to JSON at
%LocalAppData%\ClaudeCodeExtension\claudecode-settings.jsonusing Newtonsoft.Json - Thread Safety: Use
ThreadHelper.ThrowIfNotOnUIThread()andJoinableTaskFactory.SwitchToMainThreadAsync()for UI thread operations - Resources: Dispose terminal processes and temp directories in
Dispose()pattern; clean up%TEMP%\ClaudeCodeVS\*on startup - Constants: Use
constfor hardcoded strings (e.g.,ConfigurationFileName),static readonlyfor computed values
- Extension embeds terminal (cmd.exe or wsl.exe) using Win32 interop to host AI CLI tools (Claude Code, Codex, Cursor Agent, Qwen Code)
- Settings, theme, workspace, terminal I/O, and provider management are separated into partial class files for maintainability