Home / Blog / Disable Visual Studio 2017 security attach warning
Disable Visual Studio 2017 security attach warning

Disable Visual Studio 2017 security attach warning

Running Visual Studio as administrator is needed to host your web project in IIS. Everytime the debugger is started the "Attach Security Warning" confirmation dialog appears. Actually there is no security risk at our local machine, so let's disable this.

 

In previous version of Visual Studio it was possible to disable the warning in the registry, at this location:

 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Debugger\DisableAttachSecurityWarning

Visual Studio 2017 is version 15.0 and is not found in the default registry, because it uses a private registry file (privateregistry.bin).

 

Follow these steps to modify the registry file.

Close Visual Studio 2017. Start regedit.exe and select the node HKEY_USERS

In the File menu choose: Load Hive (in dutch: Bestand -> Component laden).

Browse to your Appdata folder.

Give the new hive a name.

 The registry file is loaded and you can edit the registry location as in previous versions of Visual Studio. Go to:

Software\Microsoft\VisualStudio\15.0xxxxx\Debugger\

Create a new DWORD key: DisableAttachSecurityWarning and set the value to 1

 Finally don't forget to unload the hive and close regedit.

 Start Visual Studio 2017 and the annoying security attach warning is gone when running the debugger attached to the IIS webserver.