How do I get the default project creation directory from within a Visual Studio 2010 extension? By default this directory is:
C:\Users\<username>\Documents\Visual Studio 2010\Projects
I'm guessing this is done via the Tools->Options window, but I don't know how to get at this via the SDK.
At first glance the following looks like it should get me close:
DTE2 dte = CType(GetService(typeof(SDTE)), DTE2);
Object props = dte.Properties("Projects and Solutions", "General");
But I get the following error:
System.Runtime.InteropServices.COMException was unhandled by user code
ErrorCode=-2147352565
Message=Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))