Ejemplo n.º 1
0
        private async Task UpdateProjectsAsync()
        {
            try
            {
                _logger.Log(String.Empty);
                _logger.Log("**************************************************");
                _logger.Log("     Starting the Project Updating process     ");
                _logger.Log("**************************************************");
                _logger.Log(String.Empty);

                _logger.Log("Solution: {0}", _solutionFileName);

                _solutionWrapper = new SolutionWrapper(_solutionFileName, _selectedVisualStudioVersion, _logger);

                await _solutionWrapper.UpdateTargetFrameworkForProjects(_selectedTargetFramework);
            }
            catch (Exception)
            {
                _logger.Log("~~~~~~ An error occurred while attempting to update all the projects ~~~~~~~");

                if (_solutionWrapper != null)
                {
                    await _solutionWrapper.CloseAsync();
                }
            }
            finally
            {
                BeginUpdateUI(() =>
                {
                    IsUpdatingProjects = false;

                    _logger.Log(String.Empty);
                    _logger.Log("**************************************************");
                    _logger.Log("     Project Updating process is finished     ");
                    _logger.Log("**************************************************");
                    _logger.Log(String.Empty);
                });
            }
        }
Ejemplo n.º 2
0
        private async Task AggregateAsync()
        {
            try
            {
                _logger.Log(String.Empty);
                _logger.Log("**************************************************");
                _logger.Log("     Starting the Project Aggregation process     ");
                _logger.Log("**************************************************");
                _logger.Log(String.Empty);

                _logger.Log("Solution: {0}", _solutionFileName);
                _logger.Log("Root Folder: {0}", _rootFolderPath);

                _solutionWrapper = new SolutionWrapper(_solutionFileName, _selectedVisualStudioVersion, _logger);

                await _solutionWrapper.AggregateProjects(_rootFolderPath);
            }
            catch (Exception)
            {
                _logger.Log("~~~~~~ An error occurred while attempting to aggregate all the projects ~~~~~~~");

                if (_solutionWrapper != null)
                {
                    await _solutionWrapper.CloseAsync();
                }
            }
            finally
            {
                BeginUpdateUI(() =>
                {

                    IsAggregating = false;

                    _logger.Log(String.Empty);
                    _logger.Log("**************************************************");
                    _logger.Log("     Project Aggretation process is finished     ");
                    _logger.Log("**************************************************");
                    _logger.Log(String.Empty);
                });
            }
        }