Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 3
0
 public void SaveSelectedMSBuild()
 {
     SettingsService.AddRecentMSBuildLocation(MSBuildLocation);
 }