VS2010 running on Windows7x64
I am trying to create a console application VS2010 and sporadically get this error:
Could not write to output file
'D:\somepath\someProjectName\obj\Debug\ProjectName.exe' -- 'Access is denied. '
Using the Sysinternals ProcessExplorer, I can see the handle of this file, but when I click on it, no application shows it, and when I try to close the handle, I get the "error opening process: the handle is invalid." Error in ProcessExplorer.
If I go to a folder in Windows Explorer, I can physically delete the file (it seems so), but the lock still persists, making me think that it may not have been deleted at all, maybe it is just waiting to be deleted?
Is this a known mistake, something I'm doing wrong, something else?
Is there a utility that can make this file unlock?
See here for possible solutions:
Visual Studio build error: unable to copy exe file from obj \ debug to bin \ debug
tbone source
share