예제 #1
0
        private static void Initialize()
        {
            if (vsShell != null)
            {
                return;
            }
            vsShell = VsServiceProvider.GetService <IVsShell>();

            object objProp;
            int    res = vsShell.GetProperty((int)__VSSPROPID2.VSSPROPID_InstallRootDir, out objProp);

            if (res == VSConstants.S_OK && objProp is string)
            {
                _InstallRootDir = objProp as string;
            }
        }
예제 #2
0
파일: VsShell.cs 프로젝트: qt-labs/vstools
        private static void Initialize()
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            if (vsShell != null)
            {
                return;
            }
            vsShell = VsServiceProvider.GetService <IVsShell>();

            int res = vsShell.GetProperty((int)__VSSPROPID2.VSSPROPID_InstallRootDir, out object o);

            if (res == VSConstants.S_OK && o is string property)
            {
                _InstallRootDir = property;
            }
        }