Fatal Error: Cannot create output file "project1.exe"

I have the feeling that when you try to rebuild the application, project1.exe is still running. Maybe it takes longer than it should to close. You can easily check by opening Task Manager and see if the process project1.exe is still active after you close the application.


I faced the same problem and I solved it . It seems that in some unknown cases the exe application remains running .
The solution is simple . You must just follow the following steps :

  1. open the windows task manager
  2. Go to the 'Processes' tab
  3. click on the 'Show processes from all users' and Your exe will appear
  4. Choose it and press the 'End Process' button

And everything will be alright.


I'm on XE7 and occasionally experience the "Could not create output file" problem, f2039. Using sysinternals' Process Explorer, I discovered an android debug process (adb.exe) had a lien on the compiled binary. Not sure why; there's no android config in this particular win32 project I'm building. Anyway, killed adb.exe and all was good thereafter.

Some points. The target output directories were never being indexed. "Application Experience" mentioned elsewhere in this thread was running the entire time. And most of the time, I could manually delete the output binary despite XE7's complaints. I noticed at one point, however, I could not delete the binary via the shell which provided the opportunity to locate the offending adb.exe via Process Explorer.


I found the solution. It appears that disabling the service "Application Experience" caused this. When disabled the task "system" will lock "any" executable for some time.

Re-enabling "Application Experience" is the solution.

Found via:

https://superuser.com/questions/260375/why-would-system-continue-locking-executable-file-handles-after-the-app-has-exit