Monday, August 27, 2012

Visual Studio blocks compilation

It happens to me a lot. After compiling and realizing that I was not done coding, I hit the compile button again just to find that something went wrong. The point is that Windows still has the file marked as in use, so that it cannot be removed. It sometimes locks it for quite a while.

Watch carefully for the message:
1>LINK : fatal error LNK1168: Could not open xxx.exe for writing
The solution, if you haven't figured it out, is to manually open the folder (directory) where xxx.exe is located and delete it. This folder defaults to the solution's debug folder. If it doesn't let you delete the file, turn off Windows' Application Experience Service.

No comments:

Post a Comment