public PackageReferenceFileList(Solution solution) { _projectPackageReferenceFiles = new List <ProjectPackageReferenceFile>(); var packageReferenceFileName = Path.Combine( VsUtility.GetNuGetSolutionFolder(solution), VsUtility.PackageReferenceFile); if (File.Exists(packageReferenceFileName)) { _solutionPackageReferenceFile = packageReferenceFileName; } foreach (Project project in solution.Projects) { GetPackageReferenceFiles(project); } }
/// <summary> /// Returns true if the solution is using the old style package restore. /// </summary> /// <param name="solution">The solution to check.</param> /// <returns>True if the solution is using the old style package restore.</returns> private static bool UsingOldPackageRestore(Solution solution) { var nugetSolutionFolder = VsUtility.GetNuGetSolutionFolder(solution); return(File.Exists(Path.Combine(nugetSolutionFolder, "nuget.targets"))); }