How It Works
The project manager scans your workspace for .NET source files and automatically:- Detects source files - Finds all
.cs,.fs, and.vbfiles in your workspace - Groups by directory - Intelligently organizes files into projects based on directory structure
- Creates project files - Generates appropriate project files (
.csproj,.fsproj,.vbproj) for each group - Maintains solutions - Updates solution files (
.sln) to include all discovered projects - Preserves configurations - Keeps existing project settings, package references, and custom properties
The project manager uses intelligent grouping: files in the same directory with the same language type are grouped into a single project, while files in different directories get separate projects.
Project File Generation
Multi-Language Support
DotNET Build Buddy supports all major .NET languages:- C# - Creates
.csprojfiles withMicrosoft.NET.Sdk - F# - Creates
.fsprojfiles with language-specific configurations - VB.NET - Creates
.vbprojfiles with RootNamespace settings
Framework Detection
The extension automatically detects the target framework for your projects:net8.0 (the latest LTS version).
Configuration Preservation
When updating existing project files, Build Buddy preserves:- Target Framework - Your specified framework version (e.g.,
net8.0,net6.0) - Nullable Reference Types -
<Nullable>enable</Nullable>settings - Custom Properties - Any additional MSBuild properties you’ve defined
- Package References - All NuGet package dependencies
- SDK Attributes - Custom SDK specifications
Solution File Management
The extension generates Visual Studio solution files (.sln) that include all discovered projects in your workspace.
Solution Structure
Generated solution files include:- Project entries - All
.csproj,.fsproj, and.vbprojfiles in the workspace - Build configurations - Debug and Release configurations for all platforms
- Project GUIDs - Automatically generated unique identifiers
- Type-specific GUIDs - Correct project type identifiers for each language
Project Type GUIDs
The correct Visual Studio project type GUID is used for each language:| Language | Project Type GUID |
|---|---|
| C# | 9A19103F-16F7-4668-BE54-9A1E7A4F7556 |
| F# | 6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705 |
| VB.NET | F184B08F-C81C-45F6-A57F-5ABD9991F28F |
Directory-Based Grouping
The project manager uses intelligent directory-based grouping to organize source files:Grouping Rules
- Files with the same language type in the same directory → Single project
- Files in different directories → Separate projects
- Different language types → Separate projects (even in same directory)
File Search Patterns
The project manager uses glob patterns to discover files while excluding build artifacts: Include Patterns:**/*.cs- All C# files**/*.fs- All F# files**/*.vb- All VB.NET files**/*.csproj,**/*.fsproj,**/*.vbproj- Existing project files
**/bin/**- Build output directories**/obj/**- Intermediate build files**/node_modules/**- Node.js dependencies
Manual Commands
While Build Buddy works automatically, you can trigger operations manually:Update Project Files
Command:
DotNET Build Buddy: Update Project FilesUpdates all project files based on current source files in the workspace.Generate Solution
Command:
DotNET Build Buddy: Generate Solution FileCreates or updates the solution file with all discovered projects.Refresh All
Command:
DotNET Build Buddy: Refresh All .NET FilesUpdates both project files and the solution file in one operation.Integration with NuGet Compatibility
The project manager integrates with the NuGet compatibility checker to validate packages during updates:Every time project files are updated, Build Buddy automatically checks all NuGet packages for compatibility with your target framework.
Best Practices
Organize code by directory
Organize code by directory
Place related source files in the same directory to have them automatically grouped into a single project. Use subdirectories to create separate projects.
Let Build Buddy handle project files
Let Build Buddy handle project files
Avoid manually editing the
<ItemGroup> sections that contain file references. Build Buddy will automatically manage these based on your directory structure.Customize properties safely
Customize properties safely
You can safely add custom MSBuild properties, package references, and other configurations. Build Buddy preserves these when updating project files.
Use consistent frameworks
Use consistent frameworks
While Build Buddy supports multiple frameworks, using consistent target frameworks across your workspace makes dependency management easier.
Troubleshooting
Common Issues:- No projects generated - Check that source files exist and aren’t in excluded directories
- Settings not preserved - Verify your custom properties are in the main
<PropertyGroup> - Wrong project type - Ensure file extensions are correct (
.cs,.fs,.vb)
Related Topics
- File Watching - Automatic updates when files change
- NuGet Compatibility - Package compatibility checking