I have installed Visual Studio on Windows server 2012 and now I'm trying to debug an existing project. This gives me 'Error while trying to run project - access denied' I have now problems running the project without debugging.
I have restarted Studio and no files are read-only
Right-click the file or folder, and then click Properties. Click the Security tab. Under Group or user names, click your name to see the permissions that you have. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.
Just use File/Open Project/Solution, select EXE file and Open it. Then select Debug/Start debugging. The other option is to run the EXE first and then Select Debug/Attach to process.
To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS Code. You can also use the keyboard shortcut Ctrl+Shift+D. The Run and Debug view displays all information related to running and debugging and has a top bar with debugging commands and configuration settings.
Found the solution enable 'use managed compatibility mode' in the debugging>general section of VS2017 options. found here:https://developercommunity.visualstudio.com/content/problem/49763/access-denied-when-attempting-to-run-under-the-deb.html
Access Denied errors can occur if a file has an unresolved lock on it. This can happen whether or not your file, typically the executable that you just compiled, is read-only or not.
The easiest way to clear a lock like that is to reboot your system. Or if you're unwilling to reboot or you just want to make one file available again, you could use a tool such as Process Explorer to find the process that is using the file, and either close the program or kill that process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With