public void Execute(ProjectConfiguration configuration, string selectedProject)
 {
     GenerateSolution(
         configuration.RootPath,
         configuration.ThirdPartiesRootPath,
         configuration.ResolveAssemblies(selectedProject));
 }
        public void Execute(ProjectConfiguration configuration, string selectedProject)
        {
            DirectoryInfo projectDirectory = new DirectoryInfo(configuration.RootPath);
            List<FileSystemInfo> projectFiles = projectDirectory
                .EnumerateFileSystemInfos("*.csproj", SearchOption.AllDirectories)
                .ToList();

            var targetProjects = configuration.ResolveAssemblies(selectedProject);

            if (_checkOnlyDependencies)
            {
                var projectSetup = new ProjectSetup
                {
                    WhenAssemblyKeyFileNotFound = ProjectSetupBehavior.Valid,
                    WhenContainsFileReferences = ProjectSetupBehavior.Valid,
                    WhenContainsProjectReferences = ProjectSetupBehavior.Warn,
                    WhenReferenceNotResolved = ProjectSetupBehavior.Warn,
                    WhenReferenceResolvedInDifferentLocation = ProjectSetupBehavior.Warn,
                    WhenRequiredProjectLinkNotFound = ProjectSetupBehavior.Valid
                };

                var consoleLogger = ConsoleLogger.Default;

                var generator = new SolutionGenerator.Toolkit.SolutionGenerator(consoleLogger);
                var projectLoader = generator.GetProjectLoader(projectSetup, configuration.RootPath);
                var targetProjectFiles = generator.GetTargetProjectFiles(projectLoader, targetProjects);

                ReferenceWalker walker = new ReferenceWalker(consoleLogger);
                var dependencies = walker.WalkReferencesRecursively(
                    projectSetup, projectLoader, targetProjectFiles,
                    new[] {configuration.ThirdPartiesRootPath}, new HashSet<string>());

                projectFiles = new List<FileSystemInfo>();
                foreach (var dependency in dependencies)
                {
                    var project = projectLoader.GetProjectById(dependency);
                    projectFiles.Add(new FileInfo(project.ProjectFileLocation));
                }
            }

            ChangeOutputPath(projectFiles, configuration.RootPath, configuration.BinariesOutputPath, targetProjects);

            ChangeReferences(projectFiles,
                configuration.RootPath,
                configuration.BinariesOutputPath,
                configuration.TargetFrameworkVersion,
                configuration.GetSystemRuntimeReferenceMode,
                configuration.GetSpecificVersionReferenceMode,
                targetProjects);

            ChangeProjectSettings(projectFiles);
        }