Ejemplo n.º 1
0
        public static Project ReadFrom(string file)
        {
            var project = new Project(file);
            project._nugetDependencies.AddRange(NugetDependency.ReadFrom(file));

            var files = new FileSystem().FindFiles(file.ParentDirectory(), new FileSet(){
                Include = "*.csproj"
            });

            var csProjFile = files.FirstOrDefault();
            if (files.Count() > 1)
            {
                csProjFile = files.FirstOrDefault(x => x.StartsWith(project.ProjectName));
            }

            project.ProjectFile = csProjFile;

            return project;
        }