.NET Tools Bridge

May 30, 2025 ยท View on GitHub

Transform Windsurf into a powerful .NET Framework development environment

.NET Tools Bridge is a comprehensive Windsurf extension that bridges the gap between modern code editors and .NET Framework development by integrating the best available language servers, build tools, and debuggers.

๐ŸŽฏ Why .NET Tools Bridge?

.NET Framework development in modern editors has been fragmented and unreliable. This extension solves that by:

  • ๐Ÿ” Automatically detecting and configuring .NET development tools
  • โšก Providing intelligent fallbacks when tools are missing
  • ๐Ÿ› ๏ธ Offering guided installation for missing components
  • ๐Ÿ”ง Supporting multiple language servers (Roslyn, OmniSharp) based on availability
  • ๐Ÿ“ฆ Working across platforms with appropriate tool detection

Instead of cryptic "tool not found" errors, you get one-click setup and clear guidance.

๐Ÿ—๏ธ Architecture & Components

Language Servers (IntelliSense)

Our priority order for C# language support:

  1. ๐Ÿฅ‡ C# Extension (muhammad-sammy) - Recommended

    • Comprehensive C# support with OmniSharp integration
    • Available on Open VSX marketplace
    • Better compatibility with non-Microsoft editors
  2. ๐Ÿฅˆ Microsoft C# Extension - Fallback

    • Official Microsoft extension with OmniSharp
    • Full-featured but Microsoft marketplace dependent
  3. ๐Ÿฅ‰ Standalone OmniSharp - Last Resort

    • Command-line OmniSharp installation via dotnet tool
    • Manual setup required but universally compatible
  4. ๐ŸŽฏ Roslyn Language Server - Windows Only

    • Uses Visual Studio's actual Roslyn language server
    • Premium experience with full .NET Framework support
    • Automatically detected from VS installations

Build Systems

  • MSBuild - Primary build system, detected from:
    • Visual Studio installations (Windows)
    • dotnet build command (cross-platform)
    • Mono MSBuild (macOS/Linux)

Debugging

  • Mono Debugger - Cross-platform .NET Framework debugging
  • Built-in .NET Debugger - For modern .NET projects

Platform Detection

  • Windows: Real Visual Studio integration via vswhere.exe
  • macOS/Linux: Intelligent tool detection and virtual VS environments

๐Ÿš€ Getting Started

Quick Installation

  1. Install .NET Tools Bridge extension
  2. Open any .NET project (.csproj, .sln)
  3. Follow the setup wizard - it will detect and install missing tools automatically

Manual Setup

If you prefer manual control:

# Install .NET SDK (if not present)
# Download from: https://dotnet.microsoft.com/download

# Install OmniSharp globally (fallback option)
dotnet tool install -g omnisharp

# Install recommended C# extension (in Windsurf)
# Search: "muhammad-sammy.csharp"

๐Ÿ”ง Our Recommendations

For Open Source / Cross-Platform Development

Use: C# Extension by muhammad-sammy + OmniSharp

  • โœ… Open VSX compatible
  • โœ… No Microsoft marketplace dependency
  • โœ… Excellent C# support
  • โœ… Works everywhere

For Windows + Visual Studio Users

Use: Roslyn Language Server (automatically detected)

  • โœ… Premium IntelliSense experience
  • โœ… Full .NET Framework support
  • โœ… Same engine as Visual Studio
  • โœ… Zero configuration required

For Corporate/Restricted Environments

Use: Standalone OmniSharp installation

  • โœ… No extension marketplace required
  • โœ… Command-line installation
  • โœ… Predictable and controlled

๐Ÿ“‹ Commands

All commands start with .NET Tools Bridge::

CommandDescription
Setup WizardInteractive setup for missing tools
Check Missing ToolsScan and report missing development tools
Install .NET ToolsInstall missing tools automatically where possible
Build ProjectBuild project using MSBuild
Clean ProjectClean build outputs
Restore ProjectRestore NuGet packages
Select Visual Studio VersionChoose VS installation (Windows)
Restart Language ServerRestart active language server
Configure Custom Tool PathsSet custom paths for tools

โš™๏ธ Configuration

{
  // Language server preference
  "vsToolsBridge.languageProviderPreference": "auto", // "auto" | "roslyn" | "omnisharp"
  
  // Visual Studio selection (Windows)
  "vsToolsBridge.preferredVSVersion": "latest", // "latest" | "2022" | "2019" | specific version
  
  // Custom tool paths (optional)
  "vsToolsBridge.customRoslynPath": "", // Path to Microsoft.CodeAnalysis.LanguageServer.exe
  "vsToolsBridge.customMSBuildPath": "", // Path to MSBuild.exe
  "vsToolsBridge.customOmniSharpPath": "", // Path to OmniSharp executable
  
  // Behavior
  "vsToolsBridge.autoRestart": true, // Auto-restart language server on crash
  "vsToolsBridge.skipSetupCheck": false, // Skip automatic setup check
  "vsToolsBridge.enableLogging": false // Enable verbose logging
}

๐Ÿ” Tool Detection Logic

Windows

  1. Visual Studio Detection: Uses vswhere.exe to find all VS installations
  2. Roslyn Discovery: Searches VS installations for Microsoft.CodeAnalysis.LanguageServer.exe
  3. MSBuild Discovery: Locates MSBuild in VS installations (Current โ†’ 17.0 โ†’ 16.0 โ†’ 15.0)
  4. Extension Fallback: Suggests C# extensions if Roslyn unavailable

macOS/Linux

  1. Tool Discovery: Searches common paths for dotnet, mono, omnisharp
  2. Extension Priority: Prioritizes Open VSX compatible extensions
  3. Package Manager Integration: Suggests Homebrew/apt installations where appropriate

๐ŸŽญ Cross-Platform Strategy

PlatformPrimary Language ServerBuild SystemDebugger
WindowsRoslyn โ†’ OmniSharpMSBuild (VS)Mono
macOSOmniSharp โ†’ Extensionsdotnet buildMono
LinuxOmniSharp โ†’ Extensionsdotnet buildMono

โšก Installation Assistant

The Installation Assistant is our killer feature:

Automatic Detection

  • Scans system for .NET SDK, language servers, build tools
  • Identifies missing components with clear explanations
  • Provides multiple installation options ranked by preference

Guided Installation

  • One-click installs where possible (dotnet tool install)
  • Step-by-step instructions for manual installations
  • Marketplace links for extension installations
  • Cancellable operations with proper progress feedback

Smart Recommendations

  • Prioritizes Open VSX extensions over Microsoft marketplace
  • Suggests appropriate tools based on platform and existing setup
  • Explains tradeoffs between different options

๐Ÿ› ๏ธ Development & Testing

Local Development

git clone <repository>
cd dotnet-tools-bridge
npm install
npm run compile

Testing

npm test                 # Run all tests
npm run lint            # Code quality checks
F5 in Windsurf         # Launch Extension Development Host

Manual Testing Scenarios

  1. Fresh system - No .NET tools installed
  2. Partial setup - Some tools missing
  3. Corporate environment - Restricted marketplace access
  4. Multiple VS versions - Version selection logic
  5. Cross-platform - macOS/Linux compatibility

๐Ÿ† Success Criteria

โœ… Working Extension Should:

  • Detect platform correctly (Windows/macOS/Linux)
  • Find Visual Studio installations (Windows)
  • Suggest appropriate C# extensions in preference order
  • Install OmniSharp automatically when possible
  • Provide cancellable installation progress
  • Handle missing tools gracefully with clear guidance
  • Support custom tool paths for corporate environments

โŒ Common Issues Fixed:

  • "Command not found" errors โ†’ Clear installation guidance
  • Missing Roslyn โ†’ Automatic OmniSharp fallback
  • Hanging installations โ†’ Cancellable progress dialogs
  • Platform confusion โ†’ Smart platform-specific recommendations
  • Complex setup โ†’ One-click installation assistant

๐Ÿ”ฎ Future Enhancements

  • Additional Language Servers: Support for other .NET language servers
  • Build System Expansion: Support for other build tools (Cake, FAKE)
  • Enhanced Debugging: Integration with additional debuggers
  • Project Templates: Scaffolding for common .NET Framework projects
  • Performance Monitoring: Language server performance tracking

๐Ÿ“ License

MIT License - See LICENSE file for details

๐Ÿค Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

๐Ÿ“ž Support

  • GitHub Issues: Bug reports and feature requests
  • Discussions: Questions and community support
  • Documentation: Check this README and inline code documentation

Making .NET Framework development in Windsurf just work โ„ข