© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•17mo ago•
40 replies
CrosRoad95

FileWatcher for project folder

        string outputDirectory = AppDomain.CurrentDomain.BaseDirectory;
        string projectDirectory = Directory.GetParent(outputDirectory).Parent.Parent.Parent.FullName; // Navigate to the project folder

        this.watcher = new FileSystemWatcher();
        this.watcher.Path = projectDirectory;
        string outputDirectory = AppDomain.CurrentDomain.BaseDirectory;
        string projectDirectory = Directory.GetParent(outputDirectory).Parent.Parent.Parent.FullName; // Navigate to the project folder

        this.watcher = new FileSystemWatcher();
        this.watcher.Path = projectDirectory;


anyone have better idea how to listen for changes in project folder? i have text file in this folder and i want to listen for changes
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Create new project in folder
C#CC# / help
3y ago
✅ Load Images from project folder
C#CC# / help
3y ago