Results 1 to 12 of 12

Thread: VS Error on Start

  1. #1

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Angry VS Error on Start

    I've been having this error off and on, different projects.

    "Unable to copy file "obj\Debug\ImportSenateRules.exe" to "bin\Debug\ImportSenateRules.exe". Access to the path 'bin\Debug\ImportSenateRules.exe' is denied."

    This is a simple project on my local machine and I have full permissions and I am the Administrator.

    I can switch to release mode and it runs just fine.

    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: VS Error on Start

    I see that every now and then. Sometimes, it just appears to have no impact, other times...well, I guess I'm not really sure what I do to fix it. Apparently, it's so insignificant that I don't remember.
    My usual boring signature: Nothing

  3. #3
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,632

    Re: VS Error on Start

    Quote Originally Posted by dbasnett View Post
    I've been having this error off and on, different projects.

    "Unable to copy file "obj\Debug\ImportSenateRules.exe" to "bin\Debug\ImportSenateRules.exe". Access to the path 'bin\Debug\ImportSenateRules.exe' is denied."

    This is a simple project on my local machine and I have full permissions and I am the Administrator.

    I can switch to release mode and it runs just fine.

    I believe it was an old Borland C compiler that would give a message like "Is it running?" when the compiled .exe file couldn't be generated.

    So, that is the question. Is the .exe file in your bin\Debug folder currently running? You may need to check task manager to find out.

  4. #4

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: VS Error on Start

    Quote Originally Posted by OptionBase1 View Post
    I believe it was an old Borland C compiler that would give a message like "Is it running?" when the compiled .exe file couldn't be generated.

    So, that is the question. Is the .exe file in your bin\Debug folder currently running? You may need to check task manager to find out.
    No. Unless when I press start it is running twice.

    If I clean the project and then rebuild the project the error goes away for awhile.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  5. #5
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,517

    Re: VS Error on Start

    Most of the time I could fix this by deleting the bin/debug/release folders. But I did have one project that I couldn't fix and had to start a new project and add the existing files to it. I never did get an answer to what actually caused the error to start happening. Good luck

    Edit: Come to think of it, I believe one time I found the offending xxx.Exe file in the obj folder.

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: VS Error on Start

    The most common cause of that is trying to compile the project while the EXE is already running.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  7. #7

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: VS Error on Start

    Quote Originally Posted by Niya View Post
    The most common cause of that is trying to compile the project while the EXE is already running.
    All I do is press Start.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  8. #8
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: VS Error on Start

    What version of Visual Studio are you using?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  9. #9

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: VS Error on Start

    Quote Originally Posted by Niya View Post
    What version of Visual Studio are you using?
    Most up to date version of VS 2022 Professional. (Doesn't it say that in the thread listing?)
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  10. #10
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: VS Error on Start

    Quote Originally Posted by dbasnett View Post
    Most up to date version of VS 2022 Professional. (Doesn't it say that in the thread listing?)
    Hmmm....So lets say you restart the system completely, start Visual Studio, open the project and pressed start, does it still not work under these conditions?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  11. #11

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: VS Error on Start

    Quote Originally Posted by Niya View Post
    Hmmm....So lets say you restart the system completely, start Visual Studio, open the project and pressed start, does it still not work under these conditions?
    IDK... I can't seem to get it to fail today. Made up some new nonsense code, clearing labels, etc. and it won't fail.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  12. #12
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: VS Error on Start

    That sounds right to me. When I've seen it, it's always just gone away. Not enough predictability to form a pattern.
    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