in src/PortingAssistantExtensionClientShared/Commands/SolutionAssessmentCommand.cs [95:119]
private async void Execute(object sender, EventArgs e)
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
try
{
if (!await CommandsCommon.CheckLanguageServerStatusAsync()) return;
if (!CommandsCommon.SetupPage()) return;
CommandsCommon.EnableAllCommand(false);
var SolutionFile = await CommandsCommon.GetSolutionPathAsync();
SolutionName = Path.GetFileName(SolutionFile);
if (UserSettings.Instance.TargetFramework.Equals(TargetFrameworkType.NO_SELECTION))
{
if (!SelectTargetDialog.EnsureExecute()) return;
}
string pipeName = Guid.NewGuid().ToString();
CommandsCommon.RunAssessmentAsync(SolutionFile, pipeName);
PipeUtils.StartListenerConnection(pipeName, GetAssessmentCompletionTasks(this.package, SolutionName));
}
catch (Exception ex)
{
NotificationUtils.ShowErrorMessageBox(this.package, $"Assessment failed for {SolutionName} due to {ex.Message}", "Assessment failed");
CommandsCommon.EnableAllCommand(true);
}
}