public void SetProject(ProjectReference project) { if (CheckForGradle(project.Path)) { try { ProjectStack.Remove(ProjectStack.Single <ProjectReference>(x => x.Path == project.Path)); } catch { // Terat as a New Project } finally { CurrentProject = project; ProjectStack.Insert(0, project); OnAccepted(); } } else { OnRejected(); } }
protected ProjectBase LoadProject(SolutionBase solution, TempFileCollection tfc, GacCache gacCache, DirectoryInfo outputDir, string projectFile) { if (ProjectStack.Contains(projectFile)) { throw new BuildException(string.Format(CultureInfo.InvariantCulture, "Circular reference to \"{0}\" detected in project \"{1}\".", Path.GetFileNameWithoutExtension(projectFile), Parent.Name), Location.UnknownLocation); } try { ProjectStack.Push(projectFile); Log(Level.Verbose, "Loading referenced project '{0}'.", projectFile); return(ProjectFactory.LoadProject(solution, SolutionTask, tfc, gacCache, ReferencesResolver, outputDir, projectFile)); } finally { ProjectStack.Pop(); } }
public void RemoveProject(ProjectReference project) { ProjectStack.Remove(project); }