private void BuildProject(string filePath)
        {
            if (!File.Exists(filePath))
            {
                return;
            }

            DisplayBuild(null);
            this.projectFilePath = filePath;
            SettingsService.AddRecentProject(projectFilePath);
            UpdateRecentItemsMenu();
            Title = projectFilePath + " - " + DefaultTitle;

            string customArguments  = SettingsService.GetCustomArguments(filePath);
            var    parametersScreen = new BuildParametersScreen();

            //parametersScreen.BrowseForMSBuild += async () => await BrowseForMSBuildExe();
            parametersScreen.PrefixArguments  = Utilities.QuoteIfNeeded(filePath);
            parametersScreen.MSBuildArguments = customArguments;
            parametersScreen.PostfixArguments = HostedBuild.GetPostfixArguments();
            parametersScreen.BuildRequested  += () =>
            {
                parametersScreen.SaveSelectedMSBuild();
                SettingsService.SaveCustomArguments(filePath, parametersScreen.MSBuildArguments);
                BuildCore(projectFilePath, parametersScreen.MSBuildArguments);
            };
            parametersScreen.CancelRequested += () =>
            {
                DisplayWelcomeScreen();
            };
            SetContent(parametersScreen);
        }
        private async void BuildCore(string projectFilePath, string customArguments)
        {
            var progress = new BuildProgress();

            progress.ProgressText = $"Building {projectFilePath}...";
            SetContent(progress);
            var   buildHost = new HostedBuild(projectFilePath, customArguments);
            Build result    = await buildHost.BuildAndGetResult(progress);

            progress.ProgressText = "Analyzing build...";
            await System.Threading.Tasks.Task.Run(() => BuildAnalyzer.AnalyzeBuild(result));

            DisplayBuild(result);
        }
Example #3
0
        private async void BuildCore(string projectFilePath, string customArguments)
        {
            var progress = new BuildProgress()
            {
                IsIndeterminate = true
            };

            progress.ProgressText = $"Building {projectFilePath}...";
            SetContent(progress);
            var   buildHost = new HostedBuild(projectFilePath, customArguments);
            Build result    = await buildHost.BuildAndGetResult(progress);

            progress.ProgressText = "Analyzing build...";
            await QueueAnalyzeBuild(result);

            DisplayBuild(result);
        }
Example #4
0
        private void Copy()
        {
            string commandLine = $@"{HostedBuild.QuoteIfNeeded(MSBuildLocation)} {PrefixArguments} {MSBuildArguments} {PostfixArguments}";

            Clipboard.SetText(commandLine);
        }
        private async void BuildCore(string projectFilePath, string customArguments)
        {
            var progress = new BuildProgress();
            progress.ProgressText = $"Building {projectFilePath}...";
            SetContent(progress);
            var buildHost = new HostedBuild(projectFilePath, customArguments);
            Build result = await buildHost.BuildAndGetResult(progress);
            result.Name = projectFilePath;

            progress.ProgressText = "Analyzing build...";
            await System.Threading.Tasks.Task.Run(() => BuildAnalyzer.AnalyzeBuild(result));
            DisplayBuild(result);
        }