0

Possible Duplicate:
VS2010 does not show unhandled exception message in a WinForms Application on a 64-bit version of Windows

Consider the following code that creates or opens a registry key:

using Microsoft.Win32;
//...
var registryKey = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Some Key");

All versions of Visual Studio are running on the same Windows 7 x64 SP1 machine. If I run it in Visual Studio 2008, it throws a System.UnauthorizedAccessException (unless I start the IDE with the "Run as administrator" option). In Visual Studio 2010 and 2012, the key fails to get created, but no exception is thrown. It just silently fails. Why?

Community
  • 1
  • 1
raven
  • 18,004
  • 16
  • 81
  • 112

0 Answers0