Exemplo n.º 1
0
        bool FindAndRemoveWin2DProjectReferences()
        {
            bool foundAReference = false;

            var toRemove = new List <XElement>();

            foreach (var reference in doc.Descendants(NS + "ProjectReference"))
            {
                if (config.IsWin2DProject(reference.Attribute("Include").Value))
                {
                    toRemove.Add(reference);
                    foundAReference = true;
                }
            }

            toRemove.ForEach(RemoveElementAndParentIfEmpty);

            if (RemoveExistingReferencesToWin2DNuGet())
            {
                foundAReference = true;
            }

            return(foundAReference);
        }