This is such a pain in the neck, I had to re-blog this….
When you are debugging in VS 2010 and attaching to the w3wp.exe process, you’ll get this lovely warning (with no option to suppress!)
To remove that warning, run the powershell command:
Set-ItemProperty HKCU:\Software\Microsoft\VisualStudio\10.0\Debugger -Name “DisableAttachSecurityWarning” -value “1”
UPDATE! Thanks to Donal Conlon for commenting that Visual Studio should not be running when you execute this command.