PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
FileSystemWatcher problems
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
FileSystemWatcher problems
![]() |
FileSystemWatcher problems |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello,
I'm trying to use the filesystemwatcher to watch for changes to my windows service's config file so that I can load the changes on the fly. However, I'm running into some trouble doing so. It seems that when I'm editing the config file in VS, it creates a temp file in the directory marked as "appname.exe.config~<some random chars>.tmp". If I have the fsw watch just the config file ie. appname.exe.config, no event is raised when I change the file. When I change the filter to "appname.exe.config*", a change event occurs but I have trouble reading from the new config file. If I edit the file in Notepad, no tmp file is created but 2 changed events are raised. I have event handlers for all events (changed, created, renamed, deleted) and changed is the only one that is raised. I'm not sure how the changes are transferred from the tmp file to the .config file. Can anyone shed some light as to what is happening? OR provide me with a better way of loading changes on the fly? Any help is appreciated! Thanks Nicholas |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

