When you are a F5 project, whether Debug or Release, Visual Studio will attach to the process, lock the file. Try to start without binding (Ctrl + F5).
The rebuild will try to overwrite the executable file, which probably could not be executed because it is locked during operation, even without a debugger attached. Thus, you cannot compile or debug your new version while the older one is working.
Expand the executable file somewhere else, run it, attach to it using another instance of Visual Studio, and continue editing in your first instance.
source
share