/// <inheritdoc /> /// <summary> /// Generates project files. /// </summary> /// <param name="arguments">Command line arguments.</param> /// <returns></returns> public override int Execute(string[] arguments) { try { var projectGenerator = ProjectGeneratorFactory.Create(); var solution = SolutionFactory.Create(arguments.Length > 0 ? arguments[0] : Path.Combine(BuildSystem.GetSdkLocation(), "Source", "GoddamnEngine.gdsln.cs")); // Generating project files.. foreach (var solutionProject in solution.Projects) { if (solutionProject.IsBuildTool) { continue; } solutionProject.GeneratorOutputPath = projectGenerator.GenerateProjectFiles(solutionProject); } //Parallel.ForEach(solution.CachedProjects.Where(project => !project.IsBuildTool) // , project => project.GeneratorOutputPath = projectGenerator.GenerateProjectFiles(project)); // Generating the solution.. solution.GeneratedSolutionPath = projectGenerator.GenerateSolutionFiles(solution); return(0); } catch (ProjectGeneratorException exception) { Console.Error.WriteLine("Unhanded error was caught while running the Project Generator Module:"); Console.Error.WriteLine(exception.Message); return(1); } }
/// <summary> /// Initializes a new instance of the <see cref="SolutionTask" /> class. /// </summary> public SolutionTask() { _projects = new FileSet(); _referenceProjects = new FileSet(); _excludeProjects = new FileSet(); _assemblyFolders = new FileSet(); _webMaps = new WebMapCollection(); _projectFactory = ProjectFactory.Create(this); _solutionFactory = SolutionFactory.Create(); _configuration = new Configuration(); }
public void Solution_ReturnsServiceProviderGetService() { var solution = SolutionFactory.Create(); var dte = DteFactory.ImplementSolution(() => solution); var serviceProvider = IServiceProviderFactory.Create(typeof(SDTE), dte); var dteServices = CreateInstance(serviceProvider); var result = dteServices.Solution; Assert.Same(solution, result); }
public void CreateMustThrowArgumentNullExceptionWhenSolutionFileIsNull() { var exception = Assert.Throws <ArgumentNullException>(() => _solutionFactory.Create(null, DefaultFileInfo)); Assert.That(exception.Message, Does.Contain("solutionFile")); }