none
suden error in VS2017 RRS feed

  • Question

  • During design VS2017 suddenly refuse to build, saying:

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

    Why suddenly "Access denied "? How to solve this - 

    Hakan Bredenberg

    Sunday, August 27, 2017 4:43 PM

All replies

  • During design VS2017 suddenly refuse to build, saying:

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

    Why suddenly "Access denied "? How to solve this - 

    Hakan Bredenberg

    Hi

    Is the application stopped? Sometimes if you are running from the Editor, and if the application is still running you can get these type of errors.


    Regards Les, Livingston, Scotland

    Sunday, August 27, 2017 4:59 PM
  • That is the compiled .exe for your application. Visual Studio deletes the last one and make an new when when you run/build. The .exe may be running as Leshay says or hung for whatever reason. Shut down Visual Studio and reopen the project. Even restart your system.

    If you need to, delete the existing file in your project debug folder shown in the error msg. Even delete the whole debug folder if needed. If you cant delete the file then it is running for some reason and should not be.

    Sunday, August 27, 2017 5:35 PM
  • I've seen this several times, it's been around, it's not project specific though. As already mentioned, the common way to fix this is to shut down Visual Studio, restart then try again. A more aggressive approach is to close Visual Studio, delete the Bin and Object folder, restart/rebuild then run.


     

    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, August 27, 2017 6:07 PM
    Moderator
  • It is possible SPONT.exe is running when you are trying to build.

    Open Task Manager (keyboard shortcut CTRL+SHIFT+ESC) and see whether SPONT.exe shows up in the list of running processes. If so, terminate it by clicking on the "End task" button. Then locate and delete obj\Debug\SPONT.exe. If you are not able to, that would mean SPONT.exe is opened by some tool (possibly, a binary editor).

    Sunday, August 27, 2017 6:47 PM
  • It is possible SPONT.exe is running when you are trying to build.

    Open Task Manager (keyboard shortcut CTRL+SHIFT+ESC) and see whether SPONT.exe shows up in the list of running processes. If so, terminate it by clicking on the "End task" button. Then locate and delete obj\Debug\SPONT.exe. If you are not able to, that would mean SPONT.exe is opened by some tool (possibly, a binary editor).

    What is the SPONT.exe that you mention? And what does it have to do with Visual Studio VB.NET?

    Regards Les, Livingston, Scotland

    Sunday, August 27, 2017 7:10 PM
  • SPONT.exe is the executable mentioned by the @Hakan Bredenberg. Please, see the original question asked.
    Sunday, August 27, 2017 11:40 PM
  • SPONT.exe is the executable mentioned by the @Hakan Bredenberg. Please, see the original question asked.

    Hi

    Duh .... I didn't see that. Thanks. Please take your first points.


    Regards Les, Livingston, Scotland


    • Edited by leshay Monday, August 28, 2017 1:59 AM
    Monday, August 28, 2017 1:59 AM