none
visual basic RRS feed

  • Question

  • Error 12 Unable to copy file "obj\Debug\WindowsApplication1.exe" to "bin\Debug\WindowsApplication1.exe". The process cannot access the file 'bin\Debug\WindowsApplication1.exe' because it is being used by another process.
    Sunday, April 29, 2018 5:51 AM

All replies

  • Warning 1 Could not copy "obj\Debug\WindowsApplication1.exe" to "bin\Debug\WindowsApplication1.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\WindowsApplication1.exe' because it is being used by another process.

    Sunday, April 29, 2018 5:49 AM
  • Close any running instance of WindowsApplication1.exe & try rebuilding.

    Take a look at

    https://social.msdn.microsoft.com/Forums/en-US/d09b3f39-6899-4691-a5a1-d9694e553cc3/i-cant-export-my-project?forum=vsx

    Sunday, April 29, 2018 6:22 AM
  • delete with file explorer after copying the project the Bin and the Obj folders


    Success
    Cor

    Sunday, April 29, 2018 7:18 AM
  • Warning 1 Could not copy "obj\Debug\WindowsApplication1.exe" to "bin\Debug\WindowsApplication1.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\WindowsApplication1.exe' because it is being used by another process.

    Make sure you don't have any copies of the program (WindowsApplication1.exe) 
    still open from an earlier test run before trying to do another build. If 
    there are any console windows open from the program, close them all. 
    If there are any GUI interfaces (e.g. - WinForms) open, close them.

    The compiler/IDE tools can't copy a newly built version of your program
    over the old version of the exe if that exe is still being executed.

    - Wayne

    Sunday, April 29, 2018 9:41 AM
  • In addition to the current replies, I've experienced this before where in the end the solution was to simply close Visual Studio and then reopen Visual Studio. There was a but in one of the releases of Visual Studio which causes this to happen. In our case it was a one project out of six in the solution where none of the processes where currently running. Admittedly this is a rare case as in say one year this happened too several of the developers in our team a handful of times. 

    It's more likely that you have a instance of the executable open outside of visual Studio or if compiling to a production area that someone opened the executable without you knowing (which should not happen since your path leads to the debug folder and nobody should have access to it other than you the developer).


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Sunday, April 29, 2018 11:08 AM
    Moderator
  • i can't actually find any instance of executable file running background or where ever

    it happens whenever i make changes to my app that i'm developing in .net

    Sunday, April 29, 2018 5:49 PM
  • i can't actually find any instance of executable file running background or where ever

    it happens whenever i make changes to my app that i'm developing in .net

    Sunday, April 29, 2018 5:50 PM
  • Hi mujahidabdulrazak,

    How did you copy the file? With code? Or just copy and paste it with the mouse manually?

    If you do it with code, please share it here.

    If you copy it manually, please close your project then retry it.

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 30, 2018 7:19 AM