Results 1 to 11 of 11

Thread: Error keep getting killed my project last time

  1. #1

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Error keep getting killed my project last time

    Well here i am once again and probally wont ever get a repsonse and get shoved to the bottom but i am here anyways,
    i keep getting the following errors
    Error 13 Unable to copy file "obj\Debug\BeffsBrowser.exe" to "bin\Debug\BeffsBrowser.exe". The process cannot access the file 'bin\Debug\BeffsBrowser.exe' because it is being used by another process. BeffsBrowser278

    And

    Error 12 Could not copy "obj\Debug\BeffsBrowser.exe" to "bin\Debug\BeffsBrowser.exe". Exceeded retry count of 10. Failed. BeffsBrowser278


    I have tried to shut off VS and restart like i have done before nothing. I am still new coming up a 1 year learner in July 2016 (a bit aways off) Anyways I don't wanna start over (Again it is annoying trying to get rid of the "Not found" errors when you try to copy every thing over to a new project as i just attempted to do and out of frustration i instead seek a easier way, So please help me!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,348

    Re: Error keep getting killed my project last time

    Quote Originally Posted by jdc20181 View Post
    Well here i am once again and probally wont ever get a repsonse and get shoved to the bottom but i am here anyways
    People will help you if they have the time, expertise and inclination to answer your question. I think we have a pretty good resolution rate here but if you ask something obscure, especially time-consuming or that you really should be able to work out for yourself then you're less likely to get helpful answers. I can't speak for everyone but self-pity is not something that tends to make me more likely to answer and passive-aggressive behaviour makes me less likely to. You may not see it but your comment comes across as a criticism of us for not helping you when we have some perceived responsibility to do so. We are all volunteering our time here so any help you get is a favour to you from a stranger, not something that you're inherently entitled to.

    Anyway, with regards to the issue, it is something that should not happen but we have all seen it at some time or another, due to a VS malfunction. It can happen more often in a particular project if something (I have no idea what) gets corrupted or it may happen regularly in many projects.

    The first course of action is to try the Clean and Rebuild options from the Build menu. If that doesn't work then close VS and delete the 'bin' and 'obj' folders from your project. If the issue continues, determine whether it happens just for particular projects or all/most. If it's the former then you can create a new project and use the Add Existing Item function to import the items from your old project. If it's the latter then you may need to Repair VS or even reinstall from scratch.

  3. #3

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: Error keep getting killed my project last time

    Yeah i have to say when i do get answers 98.2% (-1.7% of replied useless or just comments and not answers )
    I have cleaned and rebuilt the project in fact one of the first things i did. Before i delete these you say they will regenerate automatically correct?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,348

    Re: Error keep getting killed my project last time

    Quote Originally Posted by jdc20181 View Post
    Before i delete these you say they will regenerate automatically correct?
    Yes. They contain the output of the build process. The 'obj' folder contains temp files created during compilation and the 'bin' folder contains the final output. The error message is telling you that the compiled EXE file that has been created in the 'obj' folder cannot be copied to the 'bin' folder because it is locked by some process. That is presumably because the stream to the file wasn't closed when it was written, which is presumably due to a VS bug. If they are deleted, the next build will create them again, just as the first build created them in the first place.

  5. #5
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Error keep getting killed my project last time

    Being frank, even without the complaint this is the kind of thread that often doesn't get an answer. You're in the 1%, having a problem with Visual Studio that maybe a few dozen people have ever had. I know this because I've been in your seat with the exact problem, and after spending a few weeks on trying to solve it I decided to just live with it.

    Just as JMC is saying, the problem is that something has a handle open on that file.

    It could be your code, there's a few things you can do that can cause this to happen. If you're using the WebBrowser control or anything else that's intimate with ActiveX, and especially if you're doing COM interop (such as Office), the likelihood gets a little higher that you're leaving something open that means your process can't terminate and therefore your .exe file can't be unlocked.

    It could be Visual Studio, making some mistake and forgetting to close the file. This is just as likely, and I've been in a situation where it was the case.

    If you get the tool Process Explorer from Sysinternals, you can find the file that's being used and figure out who has the handle open. You can also force the handle closed, which is normally a bad idea but in this case I've never had negative results. That's how I solved my similar problem when I had it. Are you using VS 2010? It seems like almost everyone who has this problem is using it. I have yet to see the problem in VS 2013, VS 2015, or Xamarin Studio.

    But that's probably as good an answer as you will get. If the problem isn't a mistake in your code, "Clean Project" doesn't work to fix it consistently, and it happens for only one project, what you're dealing with is some manner of Visual Studio bug that might even be specific to your computer. When I had the problem, it was only one particular project, but it reproduced on several machines and it was definitely in VS 2010. I got used to using Process Explorer to free the handles, because that was faster than restarting Visual Studio.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  6. #6

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: Error keep getting killed my project last time

    I am using VS 2013 and yeah i have noticed most of my problems no one has any idea, i am using the IE control for now plan on moving to a better control i dont care for IE its a webbrowser project plus a lot of other little tadbits i made along and have published serving a small audience of about 75-100. i am gonna try the delete the bin and obj folders and go from there.

  7. #7

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: Error keep getting killed my project last time

    I love how you randomly close it after 3 times of doing it it works again....GRRR

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,348

    Re: Error keep getting killed my project last time

    Quote Originally Posted by jdc20181 View Post
    I love how you randomly close it after 3 times of doing it it works again....GRRR
    Build an application as complex as VS and lets see how many bugs you end up with in yours.

  9. #9

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: Error keep getting killed my project last time

    lol i wish i knew how You suggested that even sarcastic as it is....lol to the wrong person I am willing to try to create anything i can.

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,348

    Re: Error keep getting killed my project last time

    As I said, we've all encountered this issue at some time or another so there's obviously at least one bug in VS that results in that symptom. It's usually quite occasional though so, if you're seeing it a lot, I'd at least try repairing and possibly a full uninstall and reinstall.

  11. #11
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,043

    Re: Error keep getting killed my project last time

    Which OS are you running this on?

    I run VS on several different systems, and have run several different versions of VS. When this happens to me, it appears to be only on one system: A Surface Pro running 8.1. Since I have never seen this on any other system, I have always felt that the problem is related to something about that system. Unfortunately, it is intermittent (much more intermittent for me than what you report, too, as I see it happen about 10% of the time, or less).

    I should add, just to make this reply mostly useless: I don't have sufficient data to be certain that the problem is related to the OS and not to the project. The reason for this is that I only use the Surface for working on one particular problem, so I have an issue with an N of 1 and so intermittent as to not being worth the bother to diagnose. However, when the issue occurs, it is VSHost that is holding onto the files. Furthermore, the only solution that I have found to free the problem is a reboot. On a Surface, a reboot is so fast that it is inconsequential, but it would be a MAJOR time suck if it were to happen on my slow booting laptop.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width