Exemplo n.º 1
0
 public bool RemoveProjectReference(string url)
 {
     if (_unprocessedProjectReferences.Contains(url))
     {
         _unprocessedProjectReferences.Remove(url);
         return(true);
     }
     else
     {
         // Does this url belongs to a project in the Solution ?
         XProject prj = XSolution.FindProject(url);
         if (_ReferencedProjects.Contains(prj))
         {
             var outputname = prj.ProjectNode.OutputFile;
             _ReferencedProjects.Remove(prj);
             return(true);
         }
         RemoveProjectOutput(url);
     }
     return(false);
 }
Exemplo n.º 2
0
        private void ResolveUnprocessedProjectReferences()
        {
            if (_unprocessedProjectReferences.Count == 0)
            {
                return;
            }
            List <string> existing = new List <string>();

            foreach (string sProject in _unprocessedProjectReferences)
            {
                XProject p = XSolution.FindProject(sProject);
                if (p != null)
                {
                    existing.Add(sProject);
                    _ReferencedProjects.Add(p);
                    var outputFile = p.ProjectNode.OutputFile;
                    AddProjectOutput(sProject, outputFile);
                }
            }
            foreach (string s in existing)
            {
                _unprocessedProjectReferences.Remove(s);
            }
        }
Exemplo n.º 3
0
        public static bool Add(XProject project)
        {
            string projectName = project.Name;

            return(XSolution.Add(projectName, project));
        }