error in visual studio, Access to the path is denied

前端 未结 12 949
没有蜡笔的小新
没有蜡笔的小新 2020-12-30 06:31

I\'ve been having this problem for a while now. I created a brand new winforms c# application in Visual Studio. I can usually launch it in debug mode once without a problem.

相关标签:
12条回答
  • 2020-12-30 06:56

    Symantec Endpoint Protection caused this on my pc. It had quarantined the output folder (set it to readonly), believing it was infected.

    0 讨论(0)
  • 2020-12-30 06:59

    Had this problem on Windows 10 and it was coming from Windows Defender Antivirus.

    I excluded the folder containing the .exe file and it worked again.

    You can do that in Windows Security > Virus & threat protection settings > Exclusions

    0 讨论(0)
  • 2020-12-30 07:01

    Have you tried running VS as an administrator? I've run into this problem recently and searched online to see if anyone has found an answer to it. The only thing I do that works is run as an administrator, but I hate having to do that.

    [edit] I just read a subsequent comment by someone else about turning on Application Experience in services. That seems to have fixed it for me. I've been running on Windows client for years and just recently switched to Windows Server, which explains why I hadn't run into it before.

    0 讨论(0)
  • 2020-12-30 07:03

    First check to see if you can delete the EXE. If you can't that means some process has a handle on it.

    Run Process Explorer and do a search for TestApplication.exe to find what it is

    0 讨论(0)
  • 2020-12-30 07:03

    Do you have your bin folder included in your svn? In general, you shouldn't do this, for exacly this reason.

    These folders - bin and obj - are generated by VS, and so shoudl be regenerated if you check out the code again.

    0 讨论(0)
  • 2020-12-30 07:05

    You can Run a program called Unlocker.exe which is a small program which unlocks the locked program.

    Try to unlock the exe which is locked and it will give you the exact program which is locking it.

    This will help you pin point the problem.

    0 讨论(0)
提交回复
热议问题