Understanding Project Management
DotNET Build Buddy automatically manages your .NET project files and solution structures. This guide explains how the extension organizes projects and how to work effectively with them.Project File Generation
How Projects Are Created
The extension automatically generates project files based on your source file structure:Each directory with source files gets its own project file, named after the directory. Files in the root get a project named after the workspace folder.
Supported Project Types
The extension supports three .NET project types:C# Projects
File Extension:
.csprojSource Files: *.csSDK: Microsoft.NET.SdkDefault Framework: net8.0F# Projects
File Extension:
.fsprojSource Files: *.fsSDK: Microsoft.NET.SdkDefault Framework: net8.0VB.NET Projects
File Extension:
.vbprojSource Files: *.vbSDK: Microsoft.NET.SdkDefault Framework: net8.0Project File Structure
Generated C# project files follow the modern SDK-style format:MyProject.csproj
Updating Project Files
Automatic Updates
By default, project files are automatically updated when you:Add New Files
Create a new
.cs, .fs, or .vb file in your workspace. The extension detects the change, waits 1 second (debounce), and updates the appropriate project file.Manual Updates
You can manually trigger updates using these commands:- Update Project Files
- Generate Solution File
- Refresh All Files
Command:
DotNET Build Buddy: Update Project FilesKeyboard: Ctrl+Shift+P → Type “Update Project Files”What it does:- Scans workspace for source files
- Groups files by directory and type
- Updates all project files
- Preserves existing configurations
- Checks NuGet compatibility
- Auto-update is disabled
- You want to force an immediate update
- Files weren’t detected automatically
Configuration Preservation
The extension intelligently preserves your existing project configurations.What Gets Preserved
Target Framework
Target Framework
net8.0.Project Properties
Project Properties
Nullable, ImplicitUsings, UserSecretsId, and any other custom settings are preserved when updating.NuGet Packages
NuGet Packages
PackageReference entries are preserved with their versions. The extension also checks compatibility and provides warnings if needed.SDK Type
SDK Type
Microsoft.NET.Sdk.Web for web projects), it’s preserved. Default is Microsoft.NET.Sdk.What Gets Updated
Source File Compilation Items
The
<Compile Include="..." /> entries are updated to match current source files.Solution File Management
Solution Structure
The extension generates Visual Studio-compatible solution files:Project Type GUIDs
The extension uses correct Visual Studio project type GUIDs:| Language | GUID |
|---|---|
| C# | 9A19103F-16F7-4668-BE54-9A1E7A4F7556 |
| F# | 6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705 |
| VB.NET | F184B08F-C81C-45F6-A57F-5ABD9991F28F |
Solution Location
Solution files are always created at the workspace root with the nameSolution.sln.
Multi-Project Workspaces
Organizing Multiple Projects
Best practice for multi-project solutions:Mixed Language Projects
You can have different languages in the same solution:Target Framework Management
Framework Detection
The extension determines target framework in this order:- Existing project file: Uses
<TargetFramework>from existing.csproj/.fsproj/.vbproj - Other projects: Looks at other projects in workspace for consistency
- Default: Falls back to
net8.0
Changing Target Framework
To change your target framework:Multi-Targeting
For multi-targeting, manually edit the project file:The extension preserves
TargetFrameworks (plural) and doesn’t overwrite it with TargetFramework (singular).Watch Patterns and Exclusions
Default Watch Patterns
By default, the extension monitors:Default Exclusions
These directories are excluded:Custom Patterns
Customize watch and exclude patterns in your settings:settings.json
Disabling Auto-Updates
If you prefer manual control:settings.json
With auto-update disabled, you must manually trigger updates using the Command Palette commands.
Best Practices
Use Version Control
Always commit project files to Git before letting the extension modify them. Review changes with
git diff to ensure they’re correct.One Project Per Directory
Organize source files into directories by project. The extension creates one project per directory for clean separation.
Preserve Custom Settings
The extension preserves most settings, but review generated files if you have complex custom configurations.
Monitor Output Panel
Watch the Output panel (
Ctrl+Shift+U → “DotNET Build Buddy”) to understand what the extension is doing.Next Steps
NuGet Management
Learn how to leverage NuGet compatibility checking and smart package suggestions.
Configuration Reference
Explore all available configuration options for fine-tuning the extension.