none
File Access Denied RRS feed

  • Question

  • (not sure this is the right Forum)

    I'm using in VS C#2019 on a project I've been working on for several months.

    Suddenly, today, the IDE is giving me an error related to the project's output executable :

    Severity Code Description Project File Line Suppression State
    Error CS2012 Cannot open 'C:\C#\PTMC_2019\obj\Debug\PTMC_2019.exe' for writing -- 'Access to the path 'C:\C#\PTMC_2019\obj\Debug\PTMC_2019.exe' is denied.' PTMC_2019 C:\C#\PTMC_2019\CSC 1 Active

    I've tried compiling several of my other projects but none of them have this problem.

    I've looked at the Task Manager's list of currently running application and its not there.

    The most recently compiled executable has been deleted (along with the entire directory) trying to get the IDE to re-compile so its not running in the background somewhere... why would this happen?  How can I fix it?

    Christ


    my code is perfect until i don't find a bug

    Saturday, November 2, 2019 5:06 PM

Answers

  • thank you for your suggestions,

    I think its an Anti-Virus Software problem.  Their engineers are looking at my executable and will tell me if there's something they can do.


    my code is perfect until i don't find a bug

    • Marked as answer by Christ Kennedy Wednesday, December 25, 2019 3:40 PM
    Monday, November 4, 2019 2:22 PM

All replies

  • Can you browse to C:\C#\PTMC_2019\obj\Debug using the Files Explorer?

    Try exiting Visual Studio then restarting and trying again. If that does not solve the problem try logging off then on and try again. You should not need to do that and if the problem happens again then I agree you should solve the problem causing that to happen but restarting VS or logging off and on can help diagnose the problem.

    Have you installed any extensions or whatever recently? You can try executing VS in safe mode and if the problem does not happen in safe mode then you know it is an extension or whatever.



    Sam Hobbs
    SimpleSamples.Info

    Saturday, November 2, 2019 5:56 PM
  • Access Denied can be edited by start pc in safe-mode/normal/R.click on cmd/run as Administrator/in cmd type: services.msc in msc,scroll to Parental Software/double click/set to Disable/exit msc/restart pc..
    Sunday, November 3, 2019 5:53 AM
  • thank you for your response,

    I've rebooted. and run a system-scan with my anti-virus.

    I think it may be a BitDefender(anti-virus software issue)

    I'll keep trying.


    my code is perfect until i don't find a bug

    Monday, November 4, 2019 2:14 PM
  • thank you for your suggestions,

    I think its an Anti-Virus Software problem.  Their engineers are looking at my executable and will tell me if there's something they can do.


    my code is perfect until i don't find a bug

    • Marked as answer by Christ Kennedy Wednesday, December 25, 2019 3:40 PM
    Monday, November 4, 2019 2:22 PM