Example #1
0
        private void FindAllProjectFiles(string solutionFile, List <string> projectFiles, List <DocumentedAssembly> references)
        {
            MatchCollection projectFileMatches = Regex.Matches(solutionFile, V10ProjectPattern);

            foreach (Match current in projectFileMatches)
            {
                if (current.Groups.Count == 2)
                {
                    string projectFile = current.Groups[1].Value;
                    if (ValidExtensions.Contains(Path.GetExtension(projectFile)))
                    {
                        projectFiles.Add(projectFile);
                    }
                }
            }

            foreach (string project in projectFiles)
            {
                string fullProjectPath = Path.GetDirectoryName(FileName) + "\\" + project;
                if (File.Exists(fullProjectPath))
                {
                    ProjectFileReader reader = ProjectFileReader.Create(fullProjectPath, _filesystem);
                    reader.BuildConfiguration = BuildConfiguration;
                    references.AddRange(reader.Read());
                }
            }
        }