User permissions and Visual Studio
Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
For reasons of security, you should run Visual Studio as a typical user whenever possible.
You should also make sure not to compile, launch, or debug any Visual Studio solution that does not come from a trusted person or a trusted location.
You can do nearly everything in the Visual Studio IDE as a typical user. You need administrator permissions to complete the following tasks:
|Area||Task||For more information|
|Installation||Install or modify Visual Studio.||Install Visual Studio, Modify Visual Studio|
|Install, update, or remove local Help content.||Install and manage local Help content|
|Toolbox||Add classic COM controls to Toolbox.||Toolbox|
|Building||Use post-build events that register a component, or include a registration step when you build C++ projects.||Understand custom build steps and build events|
|Debugging||Debug applications that run with elevated permissions.||Debugger settings and preparation|
|Debug applications that a run under a different user account, such as ASP.NET websites.||Debug ASP.NET and AJAX applications|
|Debug in Zone for XAML Browser Applications (XBAP).||WPF host (PresentationHost.exe)|
|Use the emulator to debug cloud service projects for Microsoft Azure.||Debug a cloud service in Visual Studio|
|Configure a firewall for remote debugging.||Remote debugging|
|Performance tools||Attaching to an elevated application.||Measure application performance|
|Use the GPU Profiler.||GPU profiling|
|Deployment||Deploy a web application to Internet Information Services (IIS) on a local computer.||ASP.NET web deployment using Visual Studio|
|Development||Developing SharePoint Solutions.||Create SharePoint solutions|
Run Visual Studio as an administrator
If you need to run Visual Studio as an administrator, here's how.
Use the Start menu
Depending on the version of Windows you're using, perform one of the following steps:
- In Windows 10, open the Start menu, and then scroll to Visual Studio.
- In Windows 11, select the Start button, and then in the Search box, type Visual Studio.
Next, right-click either Visual Studio 2019 or Visual Studio 2022, and then select More > Run as administrator.
When Visual Studio starts, (Administrator) appears after the product name in the title bar.
Modify the shortcut
You can also modify the application shortcut to always run with administrative permissions. Here's how.
Open the Start menu, scroll to the version of Visual Studio that you're using, and then select More > Open file location.
In File Explorer, locate the Visual Studio shortcut for the version that you're using. Then, right-click the shortcut and select Send to > Desktop (create shortcut).
On the Windows 10 desktop, right-click the Visual Studio shortcut, and then select Properties.
Select the Advanced button, and then select the Run as administrator check box.
Select OK, and then select OK again.
Select the Start button, and then in the Search box, enter Visual Studio.
From the search results, right-click either Visual Studio 2019 or Visual Studio 2022, and then select Open file location.
In File Explorer, locate the Visual Studio shortcut for the version that you're using. Then, right-click the shortcut and select Show more options > Send to > Desktop (create shortcut).
On the Windows 11 desktop, right-click the Visual Studio shortcut, and then select Properties.
Next, select the Advanced button, and then select the Run as administrator check box.
Select OK two times to close the dialog.
Submit and view feedback for