Age-old problem, infuriating!
So I've been working on this pretty long, completely casual, giant project. Well, it seems like every other time I try to work on it I run into that old "Access denied" debug issue.
I want this fixed. I'm tired of it.
Facts:
Unable to write to output file 'C:\\\\\project\obj\Debug\project.exe': Access is denied.
I'm working with Windows Vista Home Premium edition, 32 bit.
Things I have tried:
1. Moving the whole project to the desktop. Simply creates a secondary version that cannot be deleted due to "access denied".
2. Reactivated the primary secret Administrator account. Still access denied.
3. Looked through properties and tried to change obj folder from being 'Read Only'. Again, access denied.
4. Using the command prompt to change settings / delete files. Access denied.
I know this is more of a vista issue, but this is the only program I have issues with or care about working with it. I'm exhausted, and I've been trying to fix this issue for over a year, off and on. Help!
Re: Age-old problem, infuriating!
Forgot to mention the access denied issue goes away sometimes when I restart the computer. That's the only way I've found to get around it. Wasting 30 minutes for every 2 hours I work on this is annoying!
Re: Age-old problem, infuriating!
Did you forget to close the file, then try to read/write from/to it again? Some code would help.
You also shouldn't write to the application's directory. There are probably lots of better places, depending on the type of data.
Re: Age-old problem, infuriating!
I may have forgotten to close the file properly. I always save before closing (and neurotically every 10 seconds), but I hadn't thought that just alt-f4ing or simply shutting down might cause the problem. Is that possible?
Re: Age-old problem, infuriating!
Oh, sorry - I thought it was your program.
Well anyways, the most likely cause is that the file is locked somehow (in use).
Re: Age-old problem, infuriating!
That doesn't make any sense though. I don't keep it as an application, it's still fully code. I only open it in visual basic.
But even if I open the program right after turning the computer on, sometimes it does this bug. Not all the time, but about 30-50% of the time. If it were a startup program using something in the project, it would happen all the time.
I don't mean to sound rude, I really am grateful that you're even reading this, I just can't seem to get this fixed. :D
Re: Age-old problem, infuriating!
Everytime you execute your application it recompiles your code and makes the .exe for you, starts the .exe then attaches the debugger to it. When you close/stop the application your debugger detaches itself. It sounds like your application is continuing to run even after you have stopped debugging. When you get the issue, look in task manager and check if you still have a copy (it may be called vshost.xx.exe). You can actually re-attach to this process and debug it and might be able to tell why its stuck. I'm sure there are options on what to do when you press 'Stop' that might allow it, I've never had to look for them however.
Re: Age-old problem, infuriating!
Hm... Alright, I'll definitely try to look at that the next time it giggles at me. Can't argue with another thing to try!
Thanks, both of you. Hope this works. :)