void AddNewImports()
        {
            var importsToAdd = new List <ProjectImportElement> ();

            foreach (ProjectImportElement import in msbuildProject.Xml.Imports)
            {
                if (!originalMSBuildProject.ImportExists(import.Project))
                {
                    importsToAdd.Add(import);
                }
            }

            foreach (ProjectImportElement importToAdd in importsToAdd)
            {
                string condition = GetCondition(importToAdd.Project);
                originalMSBuildProject.AddImport(importToAdd.Project, ProjectImportLocation.Bottom, condition);
            }

            result.AddProjectImportsAdded(importsToAdd);
        }
Exemplo n.º 2
0
        void AddNewImports()
        {
            var importsToAdd = new List <ProjectImportElement>();

            foreach (ProjectImportElement import in msbuildProject.Xml.Imports)
            {
                if (!sharpDevelopProject.ImportExists(import.Project))
                {
                    importsToAdd.Add(import);
                }
            }

            foreach (ProjectImportElement importToAdd in importsToAdd)
            {
                sharpDevelopProject.AddImportIfMissing(importToAdd.Project, ProjectImportLocation.Bottom);
            }

            result.AddProjectImportsAdded(importsToAdd);

            projectService.Save(sharpDevelopProject);
        }