Project Name: VB.NET Language Support
GitHub Organization: DNA Kode (DNAKode)
Repository: vbnet-lsp
Display Name: VB.NET Language Support
VS Code Extension Name: VB.NET Language Support
Language Server Command: vbnet-ls (internal component)
Root Namespace: VbNet.LanguageServer
Target Framework: .NET 10.0+ (latest LTS)
Distribution: VS Code Marketplace, Open VSX Registry
License: MIT (fully open source)
An open-source, Roslyn-backed extension providing first-class VB.NET language support for VS Code and compatible editors (Cursor, VSCodium, etc.). This project directly mirrors the "C# for Visual Studio Code" extension architecture (github.com/dotnet/vscode-csharp), which is the open-source foundation for C# language support. The implementation follows modern Roslyn LSP patterns and is designed as lasting infrastructure for VB.NET development.
- 100% open source under MIT license (matching the C# extension model)
VB.NETfocused (mirroring how C# extension handles C#)- Open-source debugger using Samsung's netcoredbg instead of proprietary debugger
- No proprietary components (unlike C# Dev Kit which adds closed-source features)
Provide definitive VB.NET language support for VS Code and compatible editors, achieving feature parity with the "C# for Visual Studio Code" extension while remaining fully open source.
- No guessing: Always verify C# extension behavior through source code inspection (github.com/dotnet/vscode-csharp)
- Agentic-first development: Designed for minimal manual intervention, with clear task sequencing
- Lasting infrastructure: Build for long-term
VB.NETcommunity support - Documentation as code: Maintain comprehensive, LLM-friendly documentation throughout
- Open-source debugger: Use netcoredbg (DNAKode fork tracking Samsung) instead of proprietary Microsoft debugger
- Correct
VB.NETsemantics via Roslyn (no custom parser) - LSP architecture matching C# extension (github.com/dotnet/vscode-csharp)
- Solution and project loading for
.slnand.vbproj - Incremental text synchronization with versioned documents
- Core IDE features:
- Diagnostics (matching C# extension's behavior)
- Completion (with optional resolve)
- Hover (symbol info + documentation)
- Go to Definition
- Find References
- Rename (with prepareRename)
- Document and Workspace Symbols
- Debugging integration with netcoredbg (open-source debugger)
- Performance validated against DWSIM (large real-world
VB.NETcodebase) - VS Code extension packaged and published to Marketplace
- Document and range formatting
- Code actions and quick fixes
- Semantic tokens (syntax highlighting)
- Signature help
- Inlay hints
- Call hierarchy and type hierarchy
- Folding ranges
- Code lens
- Test Explorer integration (following C# extension patterns)
- Robust multi-root workspace handling
- C# language support
- Razor / XAML / ASP.NET language layers
- OmniSharp protocol extensions
- Mixed C# and VB solutions (deferred to Phase 4)
- Editor-specific UI features beyond LSP
- Proprietary or closed-source components
- Proprietary extension features (project system UI, solution explorer enhancements, etc.)
"C# for Visual Studio Code" (github.com/dotnet/vscode-csharp) consists of:
-
VS Code Extension (TypeScript) - 97.5% of codebase
- Extension activation and lifecycle
- LSP client initialization
- Configuration management
- Debugger integration (wraps proprietary debugger)
- Command palette commands
- Status bar integration
-
Language Server (Roslyn-based)
- Roslyn workspace management
- LSP protocol implementation
- Language service adapters for
VB.NET/C# - MSBuild project loading
-
Dependencies:
- Roslyn (open source) - semantic analysis and compilation
- MSBuild integration for project loading
- LSP server architecture
- Optional: OmniSharp (legacy support, being phased out)
| Aspect | C# Extension | VB.NET Language Support |
|---|---|---|
| Language | C# (+ some VB support) | VB.NET only (focused) |
| Debugger | Proprietary Microsoft debugger | netcoredbg (open source) |
| Razor support | Yes | No (not applicable) |
| License | MIT (open source) | MIT (open source) |
| Development | Microsoft team | Community-driven, agentic |
| Dependencies | Standalone C# support | Standalone VB.NET support |
We will fork and host the C# extension (github.com/dotnet/vscode-csharp) as a reference implementation for:
- Architecture verification
- Behavior validation
- Pattern extraction
- TypeScript extension structure
- LSP integration patterns
- Debugger adapter patterns (adapted for netcoredbg)
netcoredbg (github.com/DNAKode/netcoredbg, tracks Samsung):
- Open-source .NET debugger
- Implements Debug Adapter Protocol (DAP)
- Supports .NET Core / .NET 5+
- Cross-platform (Windows, macOS, Linux)
- Replaces proprietary Microsoft debugger used by C# extension
Rule: Never guess C# extension behavior - always verify against source (github.com/dotnet/vscode-csharp).
- VS Code and derivatives (Cursor, VSCodium, etc.)
- Any LSP-compatible client that supports stdio language servers
- Validated with: VS Code (automated) and Emacs (eglot) smoke coverage; Cursor/VSCodium planned
- Server: .NET 10.0+ (latest LTS, forward-compatible)
- Roslyn and MSBuild components: Compatible with .NET 10+
- Requires: .NET SDK installed (not bundled)
- Windows (primary development)
- macOS
- Linux
- Performance testing on all three platforms
Architectural Principle: Mirror C# extension architecture (github.com/dotnet/vscode-csharp) with VB.NET language services.
1. VS Code Extension (TypeScript)
- Extension activation and lifecycle
- LSP client initialization and management
- Command registration and UI integration
- Configuration and settings management
- Language client bootstrapping
- Debugging integration with netcoredbg (Debug Adapter Protocol)
- Status bar and output channel management
2. Language Server (vbnet-ls, VB.NET/.NET)
The language server is organized into five distinct layers:
- JSON-RPC framing and stdio transport
- LSP request/notification dispatch
- Capability negotiation and feature toggles
- UTF-16 position encoding (Roslyn compatibility)
- Lifecycle management:
initialize,initialized,shutdown,exit - Request routing and handler registration
- Concurrency and cancellation policy
- Telemetry hooks and tracing infrastructure
- MSBuildWorkspace-based loading for
.slnand.vbproj - Document buffer management
- URI ↔ DocumentId mapping
- Incremental application of text changes
- Project and solution reload strategy with debouncing
- Completion, hover, signature help
- Definition, references, implementations
- Rename and rename prepare
- Document and workspace symbols
- Formatting (document and range)
- Diagnostics and code actions
- Semantic tokens and classification
- Process startup and command-line interface
- Logging configuration
- Tool configuration file discovery
- Health and self-check endpoints (LSP-friendly)
- User action in VS Code triggers LSP request
- Extension (TypeScript) sends request to language server via stdio
- Language server receives request via JSON-RPC
- Server Core validates state and obtains workspace solution snapshot
- Language Service adapter translates LSP parameters into Roslyn
VB.NETAPI calls - Roslyn processes request on background thread with immutable snapshots
- Results translated back into LSP types
- Response sent via stdout to extension
- Extension updates VS Code UI
CancellationTokenhonored end-to-end
Single Authoritative Document: docs/architecture.md
- Maintained as single source of truth
- Updated with every architectural change
- Comprehensive enough for agentic (LLM) development
- Includes diagrams, component interactions, data flows
- No separate ADR files - all decisions documented inline
- Repository: github.com/dotnet/vscode-csharp
- Fork for: Architecture patterns, LSP/DAP integration, TypeScript structure
- Verify: Solution loading, diagnostics, completion, debugger integration
- Repository: github.com/DNAKode/netcoredbg (tracks Samsung/netcoredbg)
- Purpose: Open-source .NET debugger (DAP-compliant)
- Integration: Replace Microsoft's proprietary debugger
- Repository: github.com/DanWBR/dwsim
- Fork for: Performance benchmarking, real-world validation
- Size: Large
VB.NETcodebase (100+ files)
Goal: Core language server with essential features
- Workspace load for
.slnand.vbproj - Incremental text sync
- Diagnostics (push model)
- Completion
- Hover
- Definition and references
- Rename
- Basic symbols (document + workspace)
Goal: Enhanced editing and debugging
- Formatting (document and range)
- Code actions (quick fixes + selected refactors)
- Semantic tokens
- Signature help
- Folding ranges
- Debugging integration with netcoredbg (DAP)
Status (2026-01-13): Formatting, code actions, semantic tokens, signature help, folding ranges, and netcoredbg debug harness coverage are implemented.
Follow-ups (2026-01-18):
- Bundle netcoredbg into all platform VSIX outputs using curated assets (done; see
src/extension/scripts/netcoredbg-assets.json). - macOS arm64 currently ships the x64 netcoredbg binary under Rosetta; native arm64 builds are blocked by coreclr Darwin support and remain an open investigation.
Goal: Advanced navigation and productivity
Status (2026-01-23): Advanced navigation and pull diagnostics implemented. Extension UX backlog completed. Remaining focus: Test Explorer integration, performance tuning, and release polish.
Completed (LSP features):
- Call hierarchy
- Type hierarchy
- Type definition + implementation
- Document highlights, selection ranges, and document links
- Pull diagnostics (document + workspace)
Extension UX backlog (completed, non-Razor/XAML/Blazor):
- Solution/project picker command for multi-solution workspaces (active selection).
- "Show Logs" and "Toggle LSP Trace" commands for quick diagnostics capture.
- Restore commands (workspace or selected project) with clear status notifications.
- Activation for
.slnfand.slnxto match solution filter usage in large repos. - File nesting defaults for VB artifacts (e.g.,
.Designer.vb,.g.vb,.g.i.vb,.generated.vb,.AssemblyInfo.vb,My*.vb,*.resx -> .Designer.vb). - "Reload Workspace" command to clear caches and re-open the solution.
- Attach-to-process picker command and richer debug configuration snippets (infer program via
projectPath). - "Run Tests in Context" and "Debug Tests in Context" commands (debug uses
dotnet testfor now). - package.json settings aligned with documented options (e.g.,
vbnet.logLevel,vbnet.msbuildPath,vbnet.maxMemoryMB). - SDK-style
net4xguidance (warnings + docs) and MSBuild override wiring.
Remaining / deferred in Phase 3:
- Test Explorer integration (VS Code Testing API).
- Performance tuning and indexing improvements (ongoing).
- Document the exact Roslyn package versions used by the extension in README.md.
- Inlay hints (deferred pending stable Roslyn APIs).
- Review activation events for overly aggressive activation (decision + follow-up).
- Multi-root workspace coverage (tests + UX).
- Smarter MSBuild selection warnings for x64/arm64 mismatches (macOS/WSL guidance).
- Workspace status surfacing (loaded project count, caps, and memory budget warnings).
- Debounced workspace reloads for file watcher bursts.
- Semantic tokens caching per document version.
- Debugger startup diagnostics (surface stderr + targeted hints).
- CI packaging validation: Linux netcoredbg bundle must include libdbgshim.so.
Recently completed (extension settings wiring):
- Respect
vbnet.enableto skip activation or stop the server. - Wire
vbnet.enableFormatting,vbnet.enableCodeActions, andvbnet.semanticTokenstoggles. - Implement
vbnet.loadProjectsOnStart,vbnet.maxProjectCount, andvbnet.maxMemoryMBbehavior.
Testing backlog (planned additions):
- InitializationOptions unit coverage for feature toggles + workspace caps.
- Workspace reload tests for didChangeConfiguration (solutionPath/projectPaths/search paths).
- Large-solution/scale fixture to validate project caps + warnings.
- Multi-root workspace harness coverage (server chooses correct root per folder).
- Packaging tests for bundled debugger assets (libdbgshim present, executable bit set).
- Decide whether Test Explorer integration is required for 1.0 or deferred to 1.1.
- Validate cross-platform VSIX packaging (Windows/macOS/Linux) with bundled netcoredbg.
- Run DWSIM performance validation and document results.
- Ensure docs/configuration and README accurately reflect shipped settings.
- Verify extension commands + activation events in CI (manifest tests + VS Code harness).
- Confirm Roslyn package versions in README for transparency.
Goal: Enterprise and complex scenarios
- Mixed-language solutions (serve VB documents, tolerate C# projects)
- Multi-root workspaces
- Advanced refactorings
- Workspace-wide operations
- Advanced debugging features (conditional breakpoints, watch expressions, etc.)
GitHub Organization: DNA Kode (DNAKode)
Repository Name: vbnet-lsp
vbnet-lsp/
|-- _external/ # Gitignored - reference repos + large inputs
| |-- vscode-csharp/ # C# extension (architecture reference)
| |-- netcoredbg/ # Samsung debugger (DAP reference)
| |-- roslyn/ # Roslyn source (optional)
| `-- dwsim/ # Large `VB.NET` project for testing
|-- test-explore/ # Tracked - exploratory harnesses (logs excluded)
| `-- clients/ # VS Code / Emacs harnesses, etc.
|-- src/
| |-- extension/ # VS Code extension (TypeScript)
| | |-- src/
| | | |-- extension.ts # Extension activation
| | | |-- languageClient.ts # LSP client initialization
| | | |-- commands/ # Command implementations
| | | `-- features/ # VS Code UI integration
| | |-- package.json # Extension manifest
| | `-- tsconfig.json
| `-- VbNet.LanguageServer.Vb/ # Language server (VB.NET/.NET)
| |-- Protocol/ # LSP protocol layer
| |-- Core/ # Server core and routing
| |-- Workspace/ # MSBuild and workspace management
| |-- Services/ # Language service adapters
| `-- Program.vb # Entry point
|-- test/
| |-- VbNet.LanguageServer.Tests.Vb/ # Server unit tests (VB.NET)
| |-- VbNet.Extension.Tests.Vb/ # Extension manifest tests (VB.NET)
| `-- TestProjects/ # Small test projects (tracked)
| |-- SmallProject/ # ~5-10 files
| `-- MediumProject/ # ~50 files, multi-project
|-- docs/
| |-- architecture.md # SINGLE SOURCE OF TRUTH
| |-- development.md # Dev setup and workflow
| |-- configuration.md # User configuration guide
| |-- features.md # Feature support matrix
| `-- research-plan.md # External repo examination plans
|-- .github/
| `-- workflows/
| |-- ci.yml # Build, test, lint
| |-- integration.yml # DWSIM integration tests
| |-- emacs-lsp.yml # Emacs lsp-mode validation (Linux)
| |-- performance.yml # Nightly performance tests
| `-- release.yml # Publish to marketplaces
|-- scripts/
| |-- bootstrap.sh # Initial setup script
| |-- test-dwsim.sh # DWSIM test runner
| `-- package-extension.sh # Package VSIX
|-- README.md
|-- LICENSE # MIT
|-- CONTRIBUTING.md # Issue-focused contribution
|-- CODE_OF_CONDUCT.md
`-- vbnet-lsp.sln # Main solution file
Note: _external/ is gitignored and must be set up locally. ests-exploratory/ is tracked, but its logs and downloaded runtimes are excluded.
See docs/development.md Section 2.1 for setup instructions.
Language Server (VB.NET/.NET):
Microsoft.CodeAnalysis.VisualBasic.Workspaces(Roslyn)Microsoft.Build.Locator(MSBuild discovery)Microsoft.CodeAnalysis.Workspaces.MSBuild- JSON-RPC library (StreamJsonRpc or custom)
- Logging framework (Microsoft.Extensions.Logging)
VS Code Extension (TypeScript):
vscode(VS Code extension API)vscode-languageclient(LSP client)vscode-debugadapter(DAP integration)
Debugger:
- netcoredbg (bundled with extension in Phase 2)
- Implements Debug Adapter Protocol (DAP)
| Metric | Target | Measurement |
|---|---|---|
| Startup time (medium solution, ~20 projects) | < 5 seconds | Time from launch to initialized |
| First diagnostic (after file open) | < 500ms | Time from didOpen to publishDiagnostics |
| Completion latency | < 100ms (p95) | Time from completion request to response |
| Memory usage (medium solution) | < 500 MB | Working set after initial load |
| Memory growth over 8 hours | < 20% | Long-running stability test |
| Metric | Target |
|---|---|
| Code coverage (unit tests) | > 70% |
| Integration test pass rate | 100% |
| Critical bugs (P0/P1) | 0 before release |
| Cross-platform test pass rate | 100% on Windows, macOS, Linux |
| Multi-editor validation | VS Code (automated) + Emacs (eglot) smoke; Cursor/VSCodium planned |
Editors to Validate:
- VS Code - Primary development environment (Windows, macOS, Linux)
- Cursor - Agentic coding focus
- Emacs (lsp-mode) - LSP protocol compliance validation
Automated Testing:
- GitHub Actions CI on Linux (Ubuntu latest) with Emacs lsp-mode
- Automated LSP feature tests via Emacs batch mode
- Validates LSP protocol compliance beyond VS Code specifics
Philosophy: Minimal documentation set (5 documents max), optimized for LLM consumption.
- README.md - Project overview, quick start, installation
- docs/architecture.md - Single source of truth (replaces ADRs)
- docs/development.md - Dev environment, build, test, CI/CD
- docs/configuration.md - Settings, troubleshooting, performance tuning
- docs/features.md - LSP feature matrix, roadmap, limitations
Maintenance:
- Update with every architectural change
- LLM-friendly structure (clear headers, complete context)
- Version controlled with code
- C# extension is open source (MIT)
- Provides core language support without proprietary features
- We mirror the language support foundation
- Replaces proprietary Microsoft debugger
- Implements Debug Adapter Protocol (DAP)
- Bundled with extension for better UX
- Cross-platform bundling implemented: platform VSIX packages include
.debugger/netcoredbgandLICENSE.netcoredbg. - Curated assets:
src/extension/scripts/netcoredbg-assets.jsonmaps each VSIX target to a vetted binary. - WSL2/Linux test plan (hosted or local):
- Provision Ubuntu (WSL2 or hosted VM) with .NET SDK + Node.js.
- Run
npm run bundle-debugger -- --target linux-x64before the VS Code harness. - Build VSIX for
linux-x64and install into VS Code Remote - WSL. - Run
test-explore/clients/vscodewithEXTENSION_VSIXset to the Linux VSIX and verify debug harness (including inferred program path). - Capture logs and DAP traces for parity with Windows runs.
- Focused scope (no mixed-language complexity)
- Simpler architecture
- Better
VB.NET-specific optimizations
- Designed for minimal manual intervention
- Clear task sequencing
- Comprehensive, LLM-friendly documentation
- ✅ Create comprehensive project plan
- ✅ Create GitHub organization (DNAKode)
- ✅ Initialize repository with structure
- ✅ Fork reference repositories
- ✅ Set up development environment
- ✅ Create initial documentation
- ✅ Verify C# extension behaviors
All core language services implemented and tested (as of 2026-01-23: 156 server tests + 7 extension manifest tests passing):
- ✅ Protocol Layer (JSON-RPC, LSP types, transports)
- ✅ Server Core (lifecycle, routing, state management)
- ✅ Workspace Layer (WorkspaceManager, DocumentManager)
- ✅ Language Services:
- ✅ DiagnosticsService (real-time with debouncing)
- ✅ CompletionService (with resolve)
- ✅ HoverService (with XML documentation)
- ✅ DefinitionService (Go to Definition)
- ✅ ReferencesService (Find All References)
- ✅ RenameService (with prepare)
- ✅ SymbolsService (Document + Workspace symbols)
Remaining items to align with C# extension/Roslyn behavior:
- LSP request cancellation (
$/cancelRequest) should cancel in-flight handlers consistently (verify end-to-end). - Completion resolve uses an approximate position; align with Roslyn completion item resolution.
- Completion items should apply Roslyn text changes (
TextEdit/AdditionalTextEdits) instead of plain insert text.
Completed follow-ups:
- Honor
vbnet.diagnostics.enableandvbnet.completion.enablesettings in client/server behavior. - Handle
workspace/didChangeWatchedFilesto keep the workspace in sync with external edits.
Implemented features:
- Code formatting (document and range)
- Code actions (baseline source actions)
- Semantic tokens
- Signature help
- Folding ranges
- Debugging integration (netcoredbg)
Remaining items:
- Diagnostic quick fixes (Roslyn analyzer fixes surfaced as code actions)
Never guess - always verify:
- C# extension source code (github.com/dotnet/vscode-csharp) - primary reference
- netcoredbg source and docs (github.com/DNAKode/netcoredbg) - debugger integration
- Official Microsoft Roslyn and LSP documentation
- Empirical testing and behavioral comparison
- Document all findings in docs/architecture.md
Plan Version: 4.2 (Phase 3 in progress) Last Updated: 2026-01-23 Status: Phase 3 in progress Key Change: Extension UX backlog completed; test explorer + performance + release polish next License: MIT (fully open source)