Rediger

Del via


User permissions and Visual Studio

For reasons of security, you should run Visual Studio as a typical user whenever possible.

Warning

Be 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 Initial installation and configuration of Visual Studio Install Visual Studio, Configure Visual Studio policies
Installation Modify or update Visual Studio. Requires administrator permissions by default, but can be configured and delegated to standard users. Update Visual Studio, Modify Visual Studio
Help 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
Debugging Debug applications that run under a different user account, such as ASP.NET websites. Debug ASP.NET and AJAX applications
Debugging Debug in Zone for XAML Browser Applications (XBAP). WPF host (PresentationHost.exe)
Debugging Use the emulator to debug cloud service projects for Microsoft Azure. Debug a cloud service in Visual Studio
Debugging Configure a firewall for remote debugging. Remote debugging
Performance tools Attaching to an elevated application. Measure application performance
Profiling 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

  1. 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.
  2. Next, right-click either Visual Studio 2019 or Visual Studio 2022, and then select Run as administrator.

    When Visual Studio starts, (Administrator) appears after the product name in the title bar, and ADMIN appears near the top right of the Visual Studio window, in the same area where PREVIEW appears if you are using a preview build of Visual Studio. You can click on this button to view the About dialog.

    Screenshot showing ADMIN in top right corner of the Visual Studio window.

Modify the shortcut

You can also modify the application shortcut to always run with administrative permissions. Here's how.

Windows 10

  1. Open the Start menu, scroll to the version of Visual Studio that you're using, and then select More > Open file location.

  2. 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).

  3. On the Windows 10 desktop, right-click the Visual Studio shortcut, and then select Properties.

  4. Select the Advanced button, and then select the Run as administrator check box.

  5. Select OK, and then select OK again.

Windows 11

  1. Select the Start button, and then in the Search box, enter Visual Studio.

  2. From the search results, right-click either Visual Studio 2019 or Visual Studio 2022, and then select Open file location.

  3. 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).

  4. On the Windows 11 desktop, right-click the Visual Studio shortcut, and then select Properties.

  5. Next, select the Advanced button, and then select the Run as administrator check box.

  6. Select OK two times to close the dialog.