Sometimes, as you test your application (during the debugging process), you may inadvertantly fail to properly shut the app down (usually the result of a coding error). This will generate that error. Make sure that after being shut down, your app isn't still showing up in Task Manager.
You calso download ProcessExplorer. It will tell you what processes have files open:
http://technet.microsoft.com/en-us/sysinternals/bb896653[
^]