Skip to main content

Welcome to DotNET Build Buddy

DotNET Build Buddy is a VS Code extension that automatically manages .NET project files and provides intelligent NuGet compatibility checking. This guide will help you get started quickly.

Installation

From VS Code Marketplace

1

Open VS Code Extensions Panel

Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac) to open the Extensions panel.
2

Search for DotNET Build Buddy

Type “DotNET Build Buddy” in the search box and press Enter.
3

Install the Extension

Click the Install button on the DotNET Build Buddy extension by DotNET-Build-Buddy.
4

Verify Installation

After installation completes, the extension will be listed in your installed extensions.

Requirements

  • VS Code: Version 1.74.0 or higher
  • Workspace: Must contain .NET files (.cs, .fs, .vb) or project files

Activation

The extension automatically activates when you open a workspace containing .NET files.

How Activation Works

DotNET Build Buddy activates when it detects any of the following files in your workspace:
  • Source files: *.cs, *.fs, *.vb
  • Project files: *.csproj, *.fsproj, *.vbproj
  • Solution files: *.sln
When the extension activates successfully, you’ll see a notification: “DotNET Build Buddy is ready to manage your .NET projects!”

Verification

1

Check Extension Status

Open the Extensions panel (Ctrl+Shift+X) and verify that DotNET Build Buddy is enabled.
2

View Output Logs

Open the Output panel (Ctrl+Shift+U) and select “DotNET Build Buddy” from the dropdown to see activation messages.
3

Test Commands

Open the Command Palette (Ctrl+Shift+P) and type “DotNET Build Buddy” to see available commands.

Quick Start

Starting from Scratch

If you’re starting a new .NET project without existing project files:
1

Create Source Files

Create your .NET source files (e.g., Program.cs, App.fs, Module.vb) in your workspace directory.
Program.cs
namespace MyApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
        }
    }
}
2

Automatic Project File Generation

The extension automatically detects your source files and creates appropriate project files (.csproj, .fsproj, or .vbproj) based on your file structure.
Project files are created in the same directory as your source files.
3

Solution File Generation

A solution file (Solution.sln) is automatically generated at the workspace root, including all discovered projects.
4

Start Coding

Your project structure is now ready! Add more files, and the extension will automatically update your project files.

Working with Existing Projects

If you already have .NET project files:
1

Open Your Workspace

Open your existing .NET project workspace in VS Code.
2

Extension Auto-Updates

The extension automatically monitors your files. When you add, modify, or delete source files, project files are updated automatically.
3

Manual Updates (Optional)

If needed, you can manually trigger updates using the Command Palette:
  • DotNET Build Buddy: Update Project Files
  • DotNET Build Buddy: Generate Solution File
  • DotNET Build Buddy: Refresh All .NET Files

Available Commands

Access these commands through the Command Palette (Ctrl+Shift+P):
Manually generates a solution file (.sln) that includes all project files in your workspace.When to use: When you want to create or refresh the solution file without updating project files.
Manually updates all project files based on current source files in your workspace.When to use: When automatic updates are disabled or you want to force an immediate update.
Updates both project files and solution file in one operation.When to use: When you want a complete refresh of all generated files.

Understanding Auto-Updates

By default, DotNET Build Buddy automatically monitors your workspace and updates project files when changes occur.

How Auto-Updates Work

  1. File Watching: The extension monitors file patterns defined in watchPatterns setting (default: **/*.cs, **/*.fs, **/*.vb)
  2. Debouncing: Changes are debounced (1 second delay) to avoid excessive updates
  3. Smart Grouping: Files are grouped by directory structure, creating separate projects when appropriate
  4. Configuration Preservation: Existing project settings, NuGet packages, and custom properties are preserved

Excluded Directories

The following directories are excluded from monitoring by default:
  • **/bin/** - Build output
  • **/obj/** - Intermediate files
  • **/node_modules/** - Node.js dependencies
You can customize watch patterns and exclusions in the extension settings. See the Configuration section below.

Basic Configuration

Access settings through: File > Preferences > Settings (or Ctrl+,) and search for “DotNET Build Buddy”.

Essential Settings

settings.json
{
  // Enable or disable automatic updates
  "dotnetBuildBuddy.autoUpdate": true,
  
  // Enable NuGet compatibility checking
  "dotnetBuildBuddy.nugetCheckEnabled": true,
  
  // Enable real-time NuGet API lookups
  "dotnetBuildBuddy.nugetApiEnabled": true
}
For complete configuration options, see the Configuration Reference documentation.

NuGet Compatibility Overview

One of the most powerful features of DotNET Build Buddy is intelligent NuGet package compatibility checking.

What It Does

  • Real-time Checking: Verifies package compatibility with your target framework
  • Inline Diagnostics: Shows warnings and errors directly in project files
  • Smart Suggestions: Recommends correct versions and alternative packages
  • Framework Upgrades: Suggests when to upgrade your target framework

Example

When you open a .csproj file with incompatible packages:
MyProject.csproj
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
  
  <ItemGroup>
    <!-- Red squiggly line appears here -->
    <PackageReference Include="EntityFramework" Version="6.4.4" />
  </ItemGroup>
</Project>
Hovering over the underlined package shows:

Error Message

❌ EntityFramework: Package is not compatible with net8.0🔄 Alternative: Microsoft.EntityFrameworkCore (8.0.0)📝 Recommendation: Modern Entity Framework Core for .NET Core/.NET 5+
Learn more about NuGet features in the NuGet Management Guide.

Next Steps

Working with Projects

Learn how to manage project files, organize your workspace, and handle multi-project solutions.

NuGet Management

Master NuGet compatibility checking, package suggestions, and dependency management.

Configuration

Explore all configuration options and customize the extension to your needs.

Troubleshooting

Find solutions to common issues and learn debugging techniques.

Getting Help

  1. Open Output panel: Ctrl+Shift+U
  2. Select “DotNET Build Buddy” from dropdown
  3. Review log messages for activity and errors
  1. Open Developer Tools: Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (Mac)
  2. Switch to Console tab
  3. Look for “DotNET Build Buddy” messages
If you encounter problems:
  1. Check the Troubleshooting Guide
  2. Search existing GitHub Issues
  3. Create a new issue with:
    • VS Code version
    • Extension version
    • Steps to reproduce
    • Output panel logs

Tips for Success

Preserve Your Work: Always use version control (Git) before letting the extension modify project files. This allows you to review changes and revert if needed.
Organize by Directory: Create separate directories for different projects. The extension automatically groups source files by directory, creating one project per directory.
Monitor the Output Panel: Keep an eye on the Output panel when working with the extension to understand what it’s doing and catch any issues early.
If you have complex custom project configurations, review the generated files carefully to ensure your customizations are preserved.

Build docs developers (and LLMs) love