rudimentary solve for issues #4108, #10256 - "Allow dotnet watch to run external tools" #29794
Unanswered
Beej126
asked this question in
Show and tell
Replies: 1 comment
|
better way to achieve this is to avoid relying on parsing the dotnet watch console output and instead use a file system based approach. You can use a FileSystemWatcher to monitor project directories for changes and directly trigger external tools whenever a file is modified. This is more reliable because it reacts to actual file system events rather than terminal logs, which can change in format or timing. Once a change is detected, you can execute your required command or script (for example a build step or a TypeScript generator) using a process call. This approach is more stable, easier to maintain, and works consistently across environments compared to monitoring stdout from dotnet watch. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
corresponds to issues: #4108, #10256 (which are locked so we can't post there)
the basic idea is monitor the dotnet watch run stdout and trigger other tool accordingly.
see powershell script here:
https://gist.github.com/Beej126/e9812b583d1e912a6a08e1af0576975f#file-dotnet_watch_monitor-ps1
example run:
All reactions