Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi everyone the problem im having is hard to explain but my program is a filesystem watcher program and i made a project run it in debugger vb.net and it worked fine but when i move the built exe and all necessary .dll files the program runs, i get know errors but it just doesnt work. the filesystem watcher does nothing. so i created another project with all the same files and didnt work in the new project now will only run in that one project folder in debug folder and there is no mention in any of my code the directory can anyone help.

What I have tried:

ive searched online but not sure if anyones ever had this error.
Posted
Updated 23-Oct-17 7:54am
Comments
F-ES Sitecore 23-Oct-17 10:57am    
Add logging to your app, look at something like log4net, and log method calls and variables. For example it could be you are not watching the folder you think you are.
Richard MacCutchan 23-Oct-17 10:58am    
Well without more information it is difficult to suggest anything beyond saying, add some debugging and logging to your program to try and find out what is happening.

Without your full application code, there isn't anything we can do - and your full app is going to be far too big for us to wade through in a reasonable time period.

So you are going to have to gather information for yourself.
Since you can't use the debugger, you will have to fall back onto the old methods, and start by adding logging code to you app so that post crash you can find out how far it got, and narrow down where the problem is occurring.
When you have it down to a method or so, you can look closely at that and intensify the logging to find out exactly where it fails, and what the variables in the code are holding at the time.
Without that, nobody can even start to help you fix this!

Sorry, but it's up to you to gather what information you can here, we can't do any of that for you.
 
Share this answer
 
There's nothing wrong with the FileSystemWatcher, so it's down to your code.

My biggest suspicion is that you're not using a fully qualified (starts with a drive letter or UNC) path. The biggest newb mistake is assuming what the "current directory" is and just using relative paths from that. Don't!

ALWAYS build fully qualified paths to the files and folders you're using.
 
Share this answer
 
Comments
OfficalCodexPH 23-Oct-17 15:08pm    
what i dont understand dude is why the hell it works fine in one projects debugger only in any cpu and only in dubug not release and when i move the built exe the filesystem watcher dont work only the notify icon any thoughts?
Dave Kreskowiak 23-Oct-17 15:44pm    
Nope. I try not to comment on code I can't see.
OfficalCodexPH 23-Oct-17 16:06pm    
theres alot of code dude but thanks anyways

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900