-1

The first solution I found was to close everything and restart my PC. And after that the program started to execute again.

I am kind of blanked here right now, can't seem to find the reason behind this error. enter image description here

Saim Mehmood
  • 783
  • 8
  • 14
  • my apologize for posting the whole screen shot. Kindly zoom in through your browser to view the image. :) – Saim Mehmood Apr 13 '15 at 20:07
  • 1
    What error? Don't post relevant information as a picture, it doesn't google well. – H H Apr 13 '15 at 20:08
  • Describe the exact steps to get this error, like did you run it once before? Also, diagnose with TaskManager. – H H Apr 13 '15 at 20:09
  • The reason I am posting the photo here is, I don't know how to search this issue. [You can see 2 errors in the Error List below] – Saim Mehmood Apr 13 '15 at 20:11
  • 1
    Can't get my head around the title of the post... Any chance you zoom in and edit title to describe your problem? – Alexei Levenkov Apr 13 '15 at 20:11
  • @HenkHolterman Yes after restarting my PC, the first time program executed fine. But the second time, there was this issue. – Saim Mehmood Apr 13 '15 at 20:13
  • Then it doesn't shut down properly. Post all relevant (about Exit/Close) code. – H H Apr 13 '15 at 20:15
  • @AlexeiLevenkov the problem is kind of shown in the [Error List] of screen shot. And the other problem is, that I don't know what the 'reason' behind this problem is. – Saim Mehmood Apr 13 '15 at 20:15
  • Duplicate of [Unable to copy a file from obj\Debug to bin\Debug](https://stackoverflow.com/questions/2625239/unable-to-copy-a-file-from-obj-debug-to-bin-debug) – Liam Apr 30 '20 at 14:44

1 Answers1

1

The error messages below will appear any time your executable can't be written to. The most common cause is that your application is still in memory (even when you think it isn't) and as such cannot be overwritten.

Could not copy "obj\Debug\WPF.exe" to "bin\Debug\WPF.exe". Exceeded retry count of 10. Failed.

Unable to copy file "obj\Debug\WPF.exe" to "bin\Debug\WPF.exe". The process cannot access the file "bin\Debug\WPF.exe" because it is being used by another process.

Open Task Manager to see if WPF.exe is still in memory and kill it if it is. Alternatively, execute the command below to force it to be killed.

taskkill /f /im WPF.exe

If you ran the application using Ctrl+F5 you won't get the stop debugger buttons you're probably used to and might not notice that it is still running. Alternatively, you might have some code in the application that is preventing it from shutting down cleanly which results in the main window going away but the application staying in memory.

ScheuNZ
  • 911
  • 8
  • 19