private async Task BrowseForMSBuildExe() { var openFileDialog = new OpenFileDialog { Filters = { new FileDialogFilter { Name = "MSBuild (.dll;.exe)", Extensions ={ "dll", "exe" } } }, Title = "Select MSBuild file location", }; var fileName = await openFileDialog.ShowAndGetFileAsync(this); if (!File.Exists(fileName)) { return; } var isMsBuild = fileName.EndsWith("MSBuild.dll", StringComparison.OrdinalIgnoreCase) || fileName.EndsWith("MSBuild.exe", StringComparison.OrdinalIgnoreCase); if (!isMsBuild) { return; } SettingsService.AddRecentMSBuildLocation(fileName); }
private async Task BrowseForMSBuildExe() { var openFileDialog = new OpenFileDialog { Filters = { new FileDialogFilter { Name = "MSBuild", Extensions ={ "MSBuild.exe" } } }, Title = "Select MSBuild.exe location", }; var fileName = await openFileDialog.ShowAndGetFileAsync(this); if (fileName != null) { return; } SettingsService.AddRecentMSBuildLocation(fileName); }
public void SaveSelectedMSBuild() { SettingsService.AddRecentMSBuildLocation(MSBuildLocation); }