Skip to main content
This guide will walk you through using DotNET Build Buddy for the first time. You’ll see the extension automatically manage project files and check NuGet compatibility.
Time to complete: Less than 5 minutesPrerequisites: You should have installed DotNET Build Buddy

Scenario 1: Starting a New Project

Let’s create a simple C# project from scratch and watch DotNET Build Buddy do the heavy lifting.
1

Create a new workspace folder

Create an empty folder for your project and open it in VS Code:
mkdir MyDotNetApp
cd MyDotNetApp
code .
2

Create a C# source file

Create a new file called Program.cs with the following content:
Program.cs
using System;

namespace MyDotNetApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello from DotNET Build Buddy!");
        }
    }
}
Save the file (Ctrl+S or Cmd+S).
3

Watch the extension activate

When you save the .cs file, DotNET Build Buddy automatically activates. Look for the notification:
DotNET Build Buddy is ready to manage your .NET projects!
4

Generate project files

Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and run:
DotNET Build Buddy: Update Project Files
The extension creates a MyDotNetApp.csproj file automatically based on your source files.
5

Generate a solution file

Run the command:
DotNET Build Buddy: Generate Solution File
A Solution.sln file is created that includes your project. You should see:
Solution file generated: /path/to/MyDotNetApp/Solution.sln
6

Verify the generated files

Open the generated MyDotNetApp.csproj file. You’ll see a properly structured project file:
MyDotNetApp.csproj
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <OutputType>Exe</OutputType>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
  </ItemGroup>
</Project>
Success! You’ve created a .NET project without manually editing any XML files.

Scenario 2: Automatic Updates with File Watching

Now let’s see the extension’s real-time monitoring in action.
1

Enable auto-update (if not already enabled)

The dotnetBuildBuddy.autoUpdate setting is enabled by default. Verify it in your settings:
settings.json
{
  "dotnetBuildBuddy.autoUpdate": true
}
2

Add a new source file

Create a new file called Helper.cs:
Helper.cs
using System;

namespace MyDotNetApp
{
    public class Helper
    {
        public static string GetGreeting()
        {
            return "Greetings from Helper!";
        }
    }
}
Save the file.
3

Watch the automatic update

DotNET Build Buddy detects the new file and automatically updates MyDotNetApp.csproj. Open the project file and you’ll see:
MyDotNetApp.csproj
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <OutputType>Exe</OutputType>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Helper.cs" />
  </ItemGroup>
</Project>
The update happens automatically within a few seconds after saving the file - no manual command needed!
4

Verify in the Developer Console

Open the Developer Console (Help > Toggle Developer Tools) and check the Console tab. You should see messages like:
DotNET Build Buddy: Detected change in .NET source file: /path/to/Helper.cs
DotNET Build Buddy: Debounced update triggered

Scenario 3: NuGet Compatibility Checking

Let’s add some NuGet packages and see the intelligent compatibility checking in action.
1

Add a compatible NuGet package

Open MyDotNetApp.csproj and add a PackageReference inside the <ItemGroup> element:
MyDotNetApp.csproj
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <OutputType>Exe</OutputType>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Helper.cs" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
  </ItemGroup>
</Project>
Save the file. Since Newtonsoft.Json 13.0.3 is compatible with net8.0, you won’t see any warnings.
2

Add an incompatible package

Now let’s add a package that’s not compatible with net8.0. Add this PackageReference:
<PackageReference Include="EntityFramework" Version="6.4.4" />
EntityFramework 6.x is designed for .NET Framework and is not compatible with .NET 8.0.
3

See the diagnostic warnings

After saving, you’ll see:
  • A red squiggly line under the EntityFramework package reference
  • Hover over it to see a tooltip with detailed information
The tooltip will show something like:
❌ EntityFramework: Package is not compatible with net8.0
  🔄 Alternative: Microsoft.EntityFrameworkCore (8.0.0)
  📝 Recommendation: Modern Entity Framework Core for .NET Core/.NET 5+
4

Try a version mismatch

Change the Newtonsoft.Json version to an incompatible one:
<PackageReference Include="Newtonsoft.Json" Version="8.0.0" />
(Assuming this version doesn’t exist or has issues with net8.0)You’ll see a yellow squiggly line (warning) with a suggestion for the correct version in the hover tooltip.
5

Fix the compatibility issues

Update your packages based on the suggestions:
MyDotNetApp.csproj
<ItemGroup>
  <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
  <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
</ItemGroup>
Save the file. The warnings disappear!
Success! You’ve seen how DotNET Build Buddy prevents compatibility issues before they cause runtime problems.

Scenario 4: Multi-Project Solution

Let’s create a multi-project solution with different project types.
1

Create a directory structure

Create subdirectories for different projects:
mkdir MyApp.Core
mkdir MyApp.Web
2

Add files to each project

Create MyApp.Core/DataService.cs:
MyApp.Core/DataService.cs
namespace MyApp.Core
{
    public class DataService
    {
        public string GetData() => "Data from Core";
    }
}
Create MyApp.Web/Startup.cs:
MyApp.Web/Startup.cs
using MyApp.Core;

namespace MyApp.Web
{
    public class Startup
    {
        private readonly DataService _dataService;
        
        public Startup()
        {
            _dataService = new DataService();
        }
    }
}
3

Generate all project files

Run the command:
DotNET Build Buddy: Update Project Files
The extension creates:
  • MyApp.Core/MyApp.Core.csproj
  • MyApp.Web/MyApp.Web.csproj
4

Generate the solution file

Run:
DotNET Build Buddy: Generate Solution File
The Solution.sln file now includes both projects, maintaining the directory structure.
5

Verify the solution structure

Open Solution.sln and you’ll see both projects properly referenced:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Core", "MyApp.Core\MyApp.Core.csproj"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Web", "MyApp.Web\MyApp.Web.csproj"
...
Success! You’ve created a multi-project solution with automatic organization based on directory structure.

Available Commands Reference

Now that you’ve seen the extension in action, here are the three main commands you’ll use:

DotNET Build Buddy: Generate Solution File

Manually generates a solution file (.sln) for all projects in the workspace. Use this when you want to create or refresh the solution file.

DotNET Build Buddy: Update Project Files

Manually updates all project files based on current source files. Use this when auto-update is disabled or you want to force an update.

DotNET Build Buddy: Refresh All .NET Files

Updates both project files and the solution file in one command. This is the most comprehensive refresh option.

Configuration Quick Reference

Here are the most commonly used settings:
settings.json
{
  // Enable/disable automatic updates when files change
  "dotnetBuildBuddy.autoUpdate": true,
  
  // File patterns to watch for changes
  "dotnetBuildBuddy.watchPatterns": ["**/*.cs", "**/*.fs", "**/*.vb"],
  
  // Patterns to exclude from watching
  "dotnetBuildBuddy.excludePatterns": ["**/bin/**", "**/obj/**"],
  
  // Enable NuGet package compatibility checking
  "dotnetBuildBuddy.nugetCheckEnabled": true,
  
  // Enable real-time NuGet API lookups
  "dotnetBuildBuddy.nugetApiEnabled": true,
  
  // Enable caching of NuGet compatibility checks
  "dotnetBuildBuddy.nugetCacheEnabled": true
}
All settings are optional - the defaults work great for most projects. Customize only if needed.

Common Workflows

Best for: Active development when you’re frequently adding/removing files
  1. Ensure dotnetBuildBuddy.autoUpdate is true (default)
  2. Add, modify, or delete source files as usual
  3. Project files update automatically within seconds
  4. Focus on coding, not project file management
Best for: Large projects where you want control over when updates happen
  1. Set dotnetBuildBuddy.autoUpdate to false
  2. Make all your source file changes
  3. Run DotNET Build Buddy: Refresh All .NET Files when ready
  4. All project files and solution are updated at once
Best for: Adding or updating dependencies
  1. Open your .csproj file
  2. Add or modify <PackageReference> entries
  3. Save the file
  4. Watch for inline diagnostics showing compatibility issues
  5. Hover over warnings/errors for suggestions
  6. Update versions or switch to recommended alternatives
Best for: Upgrading to newer .NET versions
  1. Change the <TargetFramework> in your project file
  2. Save the file
  3. DotNET Build Buddy checks all packages for compatibility
  4. Review suggestions for incompatible packages
  5. Update or replace packages as recommended
  6. Get notified if you can upgrade to an even newer framework

Troubleshooting Tips

If something isn’t working as expected, try these quick fixes:
  1. Extension not activating: Ensure your workspace contains at least one .cs, .fs, .vb, or project file
  2. Auto-update not working: Check that dotnetBuildBuddy.autoUpdate is true in settings
  3. No NuGet diagnostics: Verify dotnetBuildBuddy.nugetCheckEnabled is true
  4. Performance issues with large projects: Disable auto-update and use manual commands instead
For more detailed troubleshooting, check the Developer Console (Help > Toggle Developer Tools) for log messages starting with “DotNET Build Buddy:”.

Next Steps

You’re now familiar with the core features of DotNET Build Buddy! Here’s what to explore next:

Configuration Guide

Learn about all available settings and advanced configuration options

NuGet Compatibility

Deep dive into NuGet compatibility checking features

Troubleshooting

Common issues and their solutions

GitHub Repository

Contribute to the project or report issues

Build docs developers (and LLMs) love