private async void Execute()

in src/PortingAssistantExtensionClientShared/Commands/SolutionPortingCommand.cs [97:126]


        private async void Execute(object sender, EventArgs e)
        {
            try
            {
                if (!await CommandsCommon.CheckLanguageServerStatusAsync()) return;
                if (!CommandsCommon.SetupPage()) return;
                if (!UserSettings.Instance.SolutionAssessed)
                {
                    NotificationUtils.ShowInfoMessageBox(this.package, "Please run a full assessment before porting", "");
                    return;
                }
                if (UserSettings.Instance.TargetFramework.Equals(TargetFrameworkType.NO_SELECTION))
                {
                    if (!SelectTargetDialog.EnsureExecute()) return;
                }
                string SolutionFile = await CommandsCommon.GetSolutionPathAsync();
                solutionName = Path.GetFileName(SolutionFile);
                var ProjectFiles = SolutionUtils.GetProjectPath(SolutionFile);
                if (!PortingDialog.EnsureExecute(solutionName)) return;
                CommandsCommon.EnableAllCommand(false);
                string pipeName = Guid.NewGuid().ToString();
                CommandsCommon.RunPortingAsync(SolutionFile, ProjectFiles, pipeName, solutionName);
                PipeUtils.StartListenerConnection(pipeName, GetSolutionCompletionTasks(this.package, solutionName, UserSettings.Instance.TargetFramework));
            }
            catch (Exception ex)
            {
                NotificationUtils.ShowErrorMessageBox(this.package, $"Porting failed for {solutionName} due to {ex.Message}", "Porting failed");
                CommandsCommon.EnableAllCommand(true);
            }
        }