Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. visual studio 2010 c# error

visual studio 2010 c# error

Scheduled Pinned Locked Moved C#
csharpdebugginghelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User3490
    wrote on last edited by
    #1

    i have this error and the solutions that i found don't work. the error is: ------------- Error 12 Unable to copy file "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Error 11 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Exceeded retry count of 10. Failed. WindowsFormsApplication1 Warning 9 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 8 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 7 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 6 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 5 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 ... THE SOLUTION THAT I FIND: -------------------------

    add following lines of code to the pre-build event command line of your project.

    if exist "$(TargetPath).locked" del "$(TargetPath).locked"
    if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"

    SECOND SOLUTION: --------------

    if exist "$(ProjectDir)bin\$(TargetFileName).locked" del "$(ProjectDir)bin\$(TargetFileName).lo

    A 1 Reply Last reply
    0
    • U User3490

      i have this error and the solutions that i found don't work. the error is: ------------- Error 12 Unable to copy file "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Error 11 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Exceeded retry count of 10. Failed. WindowsFormsApplication1 Warning 9 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 8 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 7 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 6 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 Warning 5 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1 ... THE SOLUTION THAT I FIND: -------------------------

      add following lines of code to the pre-build event command line of your project.

      if exist "$(TargetPath).locked" del "$(TargetPath).locked"
      if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"

      SECOND SOLUTION: --------------

      if exist "$(ProjectDir)bin\$(TargetFileName).locked" del "$(ProjectDir)bin\$(TargetFileName).lo

      A Offline
      A Offline
      annex45
      wrote on last edited by
      #2

      maybe it is the basic thing to say, but did you make sure the application properly shut down before compiling it? access the task manager and in it, under processes look for anything associated with your application also, did you try: Build>clean solution and then Build>rebuild Hope this Help Eyal

      U 1 Reply Last reply
      0
      • A annex45

        maybe it is the basic thing to say, but did you make sure the application properly shut down before compiling it? access the task manager and in it, under processes look for anything associated with your application also, did you try: Build>clean solution and then Build>rebuild Hope this Help Eyal

        U Offline
        U Offline
        User3490
        wrote on last edited by
        #3

        Thank you very much!! Your solution it works !!!

        A 1 Reply Last reply
        0
        • U User3490

          Thank you very much!! Your solution it works !!!

          A Offline
          A Offline
          annex45
          wrote on last edited by
          #4

          you are most welcome!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups