Overview
The extension monitors two types of files:- Source files - Files specified in
watchPatterns(e.g.,.cs,.fs,.vb) - Project files - Automatically monitored (
.csproj,.fsproj,.vbproj,.sln)
Watch Patterns
Default Configuration
By default, the extension watches for common .NET source files:Pattern Syntax
Watch patterns use glob syntax:**- Matches any number of directories*- Matches any characters in a filename?- Matches a single character{a,b}- Matches either patternaorb
Common Patterns
C# Projects
F# Projects
Multi-Language Solutions
Blazor Projects
Exclude Patterns
Default Configuration
The extension excludes common build artifacts and dependencies:Why Exclude Patterns Matter
Exclude patterns prevent the extension from:- Watching build output directories
- Creating infinite update loops
- Monitoring temporary or generated files
- Processing files that aren’t part of your source code
Recommended Exclusions
How File Watching Works
File Change Detection
The extension monitors three types of events:- File Created - New files added to the workspace
- File Changed - Existing files modified
- File Deleted - Files removed from the workspace
Debouncing
To prevent excessive updates, the extension uses a 1-second debounce timer. This means:- Multiple rapid changes trigger only one update
- The update occurs 1 second after the last change
- Better performance with batch file operations
Update Process
When a change is detected:- Check if
autoUpdateis enabled - Verify the file doesn’t match exclusion patterns
- Start debounce timer
- After 1 second, update project files
- Regenerate solution file if needed
Pattern Matching Behavior
Case Sensitivity
Pattern matching is typically case-insensitive on Windows and case-sensitive on Linux/macOS:Exclusion Priority
Exclusion patterns take priority over watch patterns:Advanced Configuration
Watching Specific Directories
Multiple File Types with Braces
Excluding Generated Code
Troubleshooting
Files Not Being Watched
Check if file matches watch patterns
Check if file matches watch patterns
Ensure your file extension is included in
watchPatterns. The extension only watches files that match the configured patterns.Verify exclusion patterns
Verify exclusion patterns
Check if the file’s path matches any
excludePatterns. Exclusions take priority over watch patterns.Check autoUpdate setting
Check autoUpdate setting
Ensure
dotnetBuildBuddy.autoUpdate is set to true. When disabled, automatic updates won’t occur.Verify workspace structure
Verify workspace structure
Make sure the file is within your VS Code workspace. Files outside the workspace aren’t monitored.
Too Many Updates
Review watch patterns
Ensure you’re not watching more files than necessary. Remove patterns for file types that don’t affect project structure.
Performance Issues
If file watching causes performance problems:Workspace vs User Settings
Workspace Settings
Configure per-project patterns in.vscode/settings.json:
Workspace settings override user settings and are ideal for project-specific configurations.
User Settings
Configure global defaults in User Settings:Examples by Project Type
ASP.NET Core Web Application
Desktop WPF Application
Class Library
Next Steps
Settings Overview
View all configuration options
NuGet Settings
Configure NuGet compatibility checking