Initialize() публичный статический Метод

Initializes the telemetry client.
public static Initialize ( DTE2 dte, string version, string telemetryKey ) : void
dte DTE2
version string
telemetryKey string
Результат void
Пример #1
0
        protected override void Initialize()
        {
            _dte = GetService(typeof(DTE)) as DTE2;

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(_dte, Vsix.Version, "e146dff7-f7c5-49ab-a7d8-3557375f6624");

            base.Initialize();

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                CommandID menuCommandID = new CommandID(PackageGuids.VSTestGeneratorCmdSetGuid, PackageIds.cmdidMyCommand);
                var       menuItem      = new OleMenuCommand(MenuItemCallback, menuCommandID);
                menuItem.BeforeQueryStatus += MenuItem_BeforeQueryStatus;
                mcs.AddCommand(menuItem);

                var settingsFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
                                                    VSTestGeneratorDirectory, "settings.json");

                var settingsDirectory = Path.GetDirectoryName(settingsFilePath);

                if (!Directory.Exists(settingsDirectory))
                {
                    Directory.CreateDirectory(settingsDirectory);
                }

                if (!File.Exists(settingsFilePath))
                {
                    TemplateMap.CopyDefaultSettingsFile(settingsFilePath);
                }
            }
        }
Пример #2
0
        protected override void Initialize()
        {
            Logger.Initialize(this, Constants.VSIX_NAME);
            Telemetry.Initialize(this, Constants.VERSION, "27e387d5-9428-4617-b79f-bcc80d4247b0");

            base.Initialize();
        }
Пример #3
0
        protected override void Initialize()
        {
            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "527270b3-08af-45b4-a972-4d63b52b2a58");

            base.Initialize();
        }
        protected override void Initialize()
        {
            base.Initialize();
            _dte     = GetService(typeof(DTE)) as DTE2;
            Instance = this;

            Telemetry.Initialize(_dte, Vsix.Version, "367cd134-ade0-4111-a928-c7a1e3b0bb00");
            Logger.Initialize(this, "Image Optimizer");

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            CommandID      cmdLossless  = new CommandID(PackageGuids.guidImageOptimizerCmdSet, PackageIds.cmdOptimizelossless);
            OleMenuCommand menuLossless = new OleMenuCommand((s, e) => { System.Threading.Tasks.Task.Run(() => OptimizeImage(false)); }, cmdLossless);

            menuLossless.BeforeQueryStatus += (s, e) => { OptimizeBeforeQueryStatus(s, false); };
            mcs.AddCommand(menuLossless);

            CommandID      cmdLossy  = new CommandID(PackageGuids.guidImageOptimizerCmdSet, PackageIds.cmdOptimizelossy);
            OleMenuCommand menuLossy = new OleMenuCommand((s, e) => { System.Threading.Tasks.Task.Run(() => OptimizeImage(true)); }, cmdLossy);

            menuLossy.BeforeQueryStatus += (s, e) => { OptimizeBeforeQueryStatus(s, true); };
            mcs.AddCommand(menuLossy);

            CommandID      cmdCopy  = new CommandID(PackageGuids.guidImageOptimizerCmdSet, PackageIds.cmdCopyDataUri);
            OleMenuCommand menuCopy = new OleMenuCommand(CopyAsBase64, cmdCopy);

            menuCopy.BeforeQueryStatus += CopyBeforeQueryStatus;
            mcs.AddCommand(menuCopy);
        }
Пример #5
0
        protected override void Initialize()
        {
            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "27e387d5-9428-4617-b79f-bcc80d4247b0");

            base.Initialize();
        }
Пример #6
0
        private void BuildDatabaseTree(bool fromUiThread)
        {
            var databaseList = new Dictionary <string, DatabaseInfo>();

            _fatalError = string.Empty;
            try
            {
                var package = _parentWindow.Package as SqlCeToolboxPackage;
                if (package == null)
                {
                    return;
                }
                if (Properties.Settings.Default.ValidateConnectionsOnStart)
                {
                    try
                    {
                        new DataConnectionHelper().ValidateConnections(package);
                    }
                    catch
                    {
                        // ignored
                    }
                }
                databaseList = DataConnectionHelper.GetDataConnections(package, true, false);
                foreach (var info in DataConnectionHelper.GetOwnDataConnections())
                {
                    if (!databaseList.ContainsKey(info.Key))
                    {
                        databaseList.Add(info.Key, info.Value);
                    }
                }
                //Boot Telemetry
                var dte = (DTE2)package.GetServiceHelper(typeof(DTE));
                Telemetry.Enabled = Properties.Settings.Default.ParticipateInTelemetry;
                if (Telemetry.Enabled)
                {
                    Telemetry.Initialize(dte,
                                         Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                                         SqlCeToolboxPackage.VisualStudioVersion.ToString(),
                                         "d4881a82-2247-42c9-9272-f7bc8aa29315");
                }
                DataConnectionHelper.LogUsage("Platform: Visual Studio " + SqlCeToolboxPackage.VisualStudioVersion.ToString(1));
            }
            catch (Exception e)
            {
                _fatalError = e.Message;
            }
            finally
            {
                if (fromUiThread)
                {
                    PrepareTreeView("Data Connections");
                    Refresh.IsEnabled = true;
                }
                var fillList = new FillDatabaseListHandler(FillDatabaseList);
                Dispatcher.BeginInvoke(fillList, databaseList); //fill the tree on the UI thread
            }
        }
Пример #7
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (!_loaded)
            {
                Telemetry.Initialize(Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                                     "d4881a82-2247-42c9-9272-f7bc8aa29315");

                ExtractDll("QuickGraph.dll");
                ExtractDll("QuickGraph.Data.dll");

                if (DataConnectionHelper.Argument != null)
                {
                    string filePath = DataConnectionHelper.Argument.ToLowerInvariant();
                    if (System.IO.File.Exists(filePath))
                    {
                        var connStr      = string.Format("Data Source={0};Max Database Size=4091", filePath);
                        var databaseList = DataConnectionHelper.GetDataConnections();
                        var item         = databaseList.Where(d => d.Value.StartsWith(connStr)).FirstOrDefault();
                        if (item.Value == null)
                        {
                            try
                            {
                                TrySave(connStr);
                            }
                            catch (Exception ex)
                            {
                                string error = DataConnectionHelper.ShowErrors(ex);
                                if (error.Contains("Minor Err.: 25028"))
                                {
                                    PasswordDialog pwd = new PasswordDialog();
                                    pwd.ShowDialog();
                                    if (pwd.DialogResult.HasValue && pwd.DialogResult.Value == true && !string.IsNullOrWhiteSpace(pwd.Password))
                                    {
                                        connStr = connStr + ";Password="******"SQL Server Compact Toolbox for runtime " + RepoHelper.apiVer;
                _explorerControl = new ExplorerControl(fabTab);
                MainGrid.Children.Add(_explorerControl);
            }
            _loaded = true;
        }
Пример #8
0
        protected override void Initialize()
        {
            Telemetry.Initialize(this, Vsix.Version, "16cf8ed8-7f32-43bf-b14d-669b7cc0b348");

            Dte     = (DTE2)GetService(typeof(DTE2));
            Options = (Options)GetDialogPage(typeof(Options));

            base.Initialize();
        }
Пример #9
0
        protected override void Initialize()
        {
            Settings = (Settings)GetDialogPage(typeof(Settings));

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "7f5bc7fb-da06-481e-b66d-40088746d163");
            OpenSublimeTextCommand.Initialize(this);

            base.Initialize();
        }
Пример #10
0
        protected override void Initialize()
        {
            _dte = GetService(typeof(DTE)) as DTE2;

            Logger.Initialize(this, Constants.VSIX_NAME);
            Telemetry.Initialize(_dte, Version, "0894118c-3b80-4aa8-a6b9-fb6b110d0c7e");
            AddCommand.Initialize(this);

            base.Initialize();
        }
Пример #11
0
        protected override void Initialize()
        {
            Options = (Options)GetDialogPage(typeof(Options));

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "5f7a8b5c-b600-46df-9014-b4cadd33d146");

            EnableSyncCommand.Initialize(this);

            base.Initialize();
        }
Пример #12
0
        protected override void Initialize()
        {
            Options = (Options)GetDialogPage(typeof(Options));

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "a97d5a5b-1ce8-4a18-8ee6-1755367949cb");

            EnableReloadCommand.Initialize(this);

            base.Initialize();
        }
Пример #13
0
        protected override void Initialize()
        {
            Options = (Options)GetDialogPage(typeof(Options));

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "939ca576-9e8b-474a-a9d7-92117432e5d6");

            OpenVsCodeCommand.Initialize(this);

            base.Initialize();
        }
Пример #14
0
        protected async override void Initialize()
        {
            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "fbfac2d0-cd41-4458-9106-488be47240c2");

            await Dispatcher.CurrentDispatcher.BeginInvoke(new Action(async() =>
            {
                await Install();
            }), DispatcherPriority.SystemIdle, null);

            base.Initialize();
        }
Пример #15
0
        protected override void Initialize()
        {
            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "1c740e68-eead-45bb-a583-0f1cf4c33100");

            ClearAllErrorsCommand.Initialize(this);
            EnableCommand.Initialize(this);
            OpenSettingsCommand.Initialize(this);
            RunNowCommand.Initialize(this);
            SpecifyRulesCommand.Initialize(this);

            base.Initialize();
        }
Пример #16
0
        protected override void Initialize()
        {
            base.Initialize();

            Telemetry.Initialize(this, Vsix.Version, "d14d5404-e81e-477d-980e-87fac8281353");
            Logger.Initialize(this, Vsix.Name);

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                CommandID   menuCommandID = new CommandID(PackageGuids.guidTextGeneratorCmdSet, PackageIds.cmdGenerate);
                MenuCommand menuItem      = new MenuCommand(Execute, menuCommandID);
                mcs.AddCommand(menuItem);
            }
        }
Пример #17
0
        protected override void Initialize()
        {
            DTE = (DTE2)GetService(typeof(DTE));

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "4f961700-5d74-4a99-b346-571e5c82cb9b");

            RemoveAllCommentsCommand.Initialize(this);
            RemoveRegionsCommand.Initialize(this);
            RemoveXmlDocComments.Initialize(this);
            RemoveAllExceptXmlDocComments.Initialize(this);
            RemoveTasksCommand.Initialize(this);
            RemoveAllExceptTaskComments.Initialize(this);

            base.Initialize();
        }
Пример #18
0
        protected override void Initialize()
        {
            _dte   = GetService(typeof(DTE)) as DTE2;
            _cache = new CommandTable(_dte);

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "c18e8661-f6e6-466d-b968-a6c128506bf4");

            InitializeSpeechRecognition();

            // Setup listening command
            var mcs  = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            var cmd  = new CommandID(PackageGuids.guidVoiceExtensionCmdSet, PackageIds.cmdidMyCommand);
            var menu = new MenuCommand(OnListening, cmd);

            mcs.AddCommand(menu);
        }
Пример #19
0
        protected async override void Initialize()
        {
            DTE = (DTE2)GetService(typeof(DTE));

            Options        = (Options)GetDialogPage(typeof(Options));
            Options.Saved += async(s, e) => await SetDefaults();

            await SetDefaults();

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "d8226d88-0507-4495-9c9c-63951a2151d3");

            PackageService.Initialize(this);
            InstallPackageCommand.Initialize(this);
            RestorePackagesCommand.Initialize(this);

            base.Initialize();
        }
Пример #20
0
        protected override void Initialize()
        {
            _dte = GetService(typeof(DTE)) as DTE2;

            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(_dte, Vsix.Version, "e146dff7-f7c5-49ab-a7d8-3557375f6624");

            base.Initialize();

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                CommandID menuCommandID = new CommandID(PackageGuids.guidAddAnyFileCmdSet, PackageIds.cmdidMyCommand);
                var       menuItem      = new OleMenuCommand(MenuItemCallback, menuCommandID);
                menuItem.BeforeQueryStatus += MenuItem_BeforeQueryStatus;
                mcs.AddCommand(menuItem);
            }
        }
Пример #21
0
 /// <summary>
 /// Initializes the logger and Application Insights telemetry client.
 /// </summary>
 /// <param name="provider">The service provider or Package instance.</param>
 /// <param name="name">The name to use for the custom Output Window pane.</param>
 /// <param name="version">The version of the Visual Studio extension.</param>
 /// <param name="telemetryKey">The Applicatoin Insights instrumentation key (usually a GUID).</param>
 public static void Initialize(IServiceProvider provider, string name, string version, string telemetryKey)
 {
     Initialize(provider, name);
     Telemetry.Initialize(provider, version, telemetryKey);
 }
        protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await base.InitializeAsync(cancellationToken, progress);

            _dte2 = await GetServiceAsync(typeof(DTE)) as DTE2;

            Assumes.Present(_dte2);

            if (_dte2 == null)
            {
                return;
            }

            var oleMenuCommandService = await GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            if (oleMenuCommandService != null)
            {
                var menuCommandId3 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidDgmlBuild);
                var menuItem3 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                   async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId3);
                oleMenuCommandService.AddCommand(menuItem3);

                var menuCommandId5 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidReverseEngineerCodeFirst);
                var menuItem5 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                   async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId5);
                oleMenuCommandService.AddCommand(menuItem5);

                var menuCommandId7 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidAbout);
                var menuItem7 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                   async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId7);
                oleMenuCommandService.AddCommand(menuItem7);

                var menuCommandId8 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidDgmlNuget);
                var menuItem8 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                   async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId8);
                oleMenuCommandService.AddCommand(menuItem8);

                var menuCommandId9 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidSqlBuild);
                var menuItem9 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                   async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId9);
                oleMenuCommandService.AddCommand(menuItem9);

                var menuCommandId10 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                    (int)PkgCmdIDList.cmdidDebugViewBuild);
                var menuItem10 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                    async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId10);
                oleMenuCommandService.AddCommand(menuItem10);

                var menuCommandId11 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                    (int)PkgCmdIDList.cmdidMigrationStatus);
                var menuItem11 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                    async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId11);
                oleMenuCommandService.AddCommand(menuItem11);

                var menuCommandId12 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                    (int)PkgCmdIDList.cmdidDbCompare);
                var menuItem12 = new OleMenuCommand(async(s, e) => await OnProjectContextMenuInvokeHandlerAsync(s, e), null,
                                                    async(s, e) => await OnProjectMenuBeforeQueryStatusAsync(s, e), menuCommandId12);
                oleMenuCommandService.AddCommand(menuItem12);

                var menuCommandId1101 = new CommandID(GuidList.guidReverseEngineerMenu,
                                                      (int)PkgCmdIDList.cmdidReverseEngineerEdit);
                var menuItem251 = new OleMenuCommand(async(s, e) => await OnReverseEngineerConfigFileMenuInvokeHandlerAsync(s, e), null,
                                                     async(s, e) => await OnReverseEngineerConfigFileMenuBeforeQueryStatusAsync(s, e), menuCommandId1101);
                oleMenuCommandService.AddCommand(menuItem251);

                var menuCommandId1102 = new CommandID(GuidList.guidReverseEngineerMenu,
                                                      (int)PkgCmdIDList.cmdidReverseEngineerRefresh);
                var menuItem252 = new OleMenuCommand(async(s, e) => await OnReverseEngineerConfigFileMenuInvokeHandlerAsync(s, e), null,
                                                     async(s, e) => await OnReverseEngineerConfigFileMenuBeforeQueryStatusAsync(s, e), menuCommandId1102);
                oleMenuCommandService.AddCommand(menuItem252);
            }
            typeof(Microsoft.Xaml.Behaviors.Behavior).ToString();
            typeof(Microsoft.VisualStudio.ProjectSystem.ProjectCapabilities).ToString();
            typeof(Xceed.Wpf.Toolkit.SplitButton).ToString();

            Telemetry.Enabled = Properties.Settings.Default.ParticipateInTelemetry;
            if (Telemetry.Enabled)
            {
                Telemetry.Initialize(Dte2,
                                     System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                                     VisualStudioVersion.ToString(),
                                     "00dac4de-337c-4fed-a835-70db30078b2a");
            }
            Telemetry.TrackEvent("Platform: Visual Studio " + VisualStudioVersion.ToString(1));
        }
        protected override void Initialize()
        {
            base.Initialize();

            _dte2 = GetService(typeof(DTE)) as DTE2;

            if (_dte2 == null)
            {
                return;
            }

            var oleMenuCommandService
                = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (oleMenuCommandService != null)
            {
                var menuCommandId3 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidDgmlBuild);
                var menuItem3 = new OleMenuCommand(OnProjectContextMenuInvokeHandler, null,
                                                   OnProjectMenuBeforeQueryStatus, menuCommandId3);
                oleMenuCommandService.AddCommand(menuItem3);

                var menuCommandId4 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidReverseEngineerDgml);
                var menuItem4 = new OleMenuCommand(OnProjectContextMenuInvokeHandler, null,
                                                   OnProjectMenuBeforeQueryStatus, menuCommandId4);
                oleMenuCommandService.AddCommand(menuItem4);

                var menuCommandId5 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidReverseEngineerCodeFirst);
                var menuItem5 = new OleMenuCommand(OnProjectContextMenuInvokeHandler, null,
                                                   OnProjectMenuBeforeQueryStatus, menuCommandId5);
                oleMenuCommandService.AddCommand(menuItem5);

                var menuCommandId7 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidAbout);
                var menuItem7 = new OleMenuCommand(OnProjectContextMenuInvokeHandler, null,
                                                   OnProjectMenuBeforeQueryStatus, menuCommandId7);
                oleMenuCommandService.AddCommand(menuItem7);

                var menuCommandId8 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidDgmlNuget);
                var menuItem8 = new OleMenuCommand(OnProjectContextMenuInvokeHandler, null,
                                                   OnProjectMenuBeforeQueryStatus, menuCommandId8);
                oleMenuCommandService.AddCommand(menuItem8);

                var menuCommandId9 = new CommandID(GuidList.guidDbContextPackageCmdSet,
                                                   (int)PkgCmdIDList.cmdidSqlBuild);
                var menuItem9 = new OleMenuCommand(OnProjectContextMenuInvokeHandler, null,
                                                   OnProjectMenuBeforeQueryStatus, menuCommandId9);
                oleMenuCommandService.AddCommand(menuItem9);
            }

            //Boot Telemetry
            Telemetry.Enabled = true;
            if (Telemetry.Enabled)
            {
                Telemetry.Initialize(Dte2,
                                     Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                                     VisualStudioVersion.ToString(),
                                     "d4881a82-2247-42c9-9272-f7bc8aa29315");
            }
            Telemetry.TrackEvent("Platform: Visual Studio " + VisualStudioVersion.ToString(1));

            // AssemblyBindingRedirectHelper.ConfigureBindingRedirects();
        }
Пример #24
0
        private void InitializeTelemetry()
        {
            var dte = (EnvDTE80.DTE2)GetService(typeof(SDTE));

            Telemetry.Initialize(dte);
        }
Пример #25
0
        protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            try
            {
                await base.InitializeAsync(cancellationToken, progress);

                var oleMenuCommandService = await GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;

                await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

                if (oleMenuCommandService != null)
                {
                    var menuCommandId3 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidDgmlBuild);

                    var menuItem3 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId3);
                    oleMenuCommandService.AddCommand(menuItem3);

                    var menuCommandId5 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidReverseEngineerCodeFirst);
                    var menuItem5 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId5);
                    oleMenuCommandService.AddCommand(menuItem5);

                    var menuCommandId7 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidAbout);
                    var menuItem7 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId7);
                    oleMenuCommandService.AddCommand(menuItem7);

                    var menuCommandId8 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidDgmlNuget);
                    var menuItem8 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId8);
                    oleMenuCommandService.AddCommand(menuItem8);

                    var menuCommandId9 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidSqlBuild);
                    var menuItem9 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId9);
                    oleMenuCommandService.AddCommand(menuItem9);

                    var menuCommandId10 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidDebugViewBuild);
                    var menuItem10 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId10);
                    oleMenuCommandService.AddCommand(menuItem10);

                    var menuCommandId11 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidMigrationStatus);
                    var menuItem11 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId11);
                    oleMenuCommandService.AddCommand(menuItem11);

                    var menuCommandId12 = new CommandID(
                        GuidList.GuidDbContextPackageCmdSet,
                        (int)PkgCmdIDList.cmdidDbCompare);
                    var menuItem12 = new OleMenuCommand(
                        OnProjectContextMenuInvokeHandler,
                        null,
                        OnProjectMenuBeforeQueryStatus,
                        menuCommandId12);
                    oleMenuCommandService.AddCommand(menuItem12);

                    var menuCommandId1101 = new CommandID(
                        GuidList.GuidReverseEngineerMenu,
                        (int)PkgCmdIDList.cmdidReverseEngineerEdit);
                    var menuItem251 = new OleMenuCommand(
                        OnReverseEngineerConfigFileMenuInvokeHandler,
                        null,
                        OnReverseEngineerConfigFileMenuBeforeQueryStatus,
                        menuCommandId1101);
                    oleMenuCommandService.AddCommand(menuItem251);

                    var menuCommandId1102 = new CommandID(
                        GuidList.GuidReverseEngineerMenu,
                        (int)PkgCmdIDList.cmdidReverseEngineerRefresh);
                    var menuItem252 = new OleMenuCommand(
                        OnReverseEngineerConfigFileMenuInvokeHandler,
                        null,
                        OnReverseEngineerConfigFileMenuBeforeQueryStatus,
                        menuCommandId1102);
                    oleMenuCommandService.AddCommand(menuItem252);
                }

                typeof(Microsoft.Xaml.Behaviors.Behavior).ToString();
                typeof(Xceed.Wpf.Toolkit.SplitButton).ToString();

                extensionServices = CreateServiceProvider();

                if (AdvancedOptions.Instance.ParticipateInTelemetry)
                {
                    Telemetry.Initialize(
                        System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                        (await VisualStudioVersionAsync()).ToString(),
                        "00dac4de-337c-4fed-a835-70db30078b2a");
                }

                Telemetry.TrackEvent("Platform: Visual Studio " + (await VisualStudioVersionAsync()).ToString(1));
            }
            catch (Exception ex)
            {
                LogError(new List <string>(), ex);
            }
        }