async Task PrepareForExecute() { nugetProjects = (await solutionManager.GetNuGetProjectsAsync()).ToList(); if (AnyProjectsUsingPackagesConfig()) { restoreManager = new PackageRestoreManager( sourceRepositoryProvider, solutionManager.Settings, solutionManager ); } if (AnyDotNetCoreProjectsOrProjectsUsingProjectJson()) { buildIntegratedRestorer = new MonoDevelopBuildIntegratedRestorer( solutionManager, sourceRepositoryProvider, solutionManager.Settings); } if (AnyNuGetAwareProjects()) { nugetAwareRestorer = new NuGetAwareProjectPackageRestoreManager(solutionManager); } }
public IEnumerable <NuGetProject> GetNuGetProjects() { var task = solutionManager.GetNuGetProjectsAsync(); task.Wait(); return(task.Result.ToList()); }
public static async Task <DependencyGraphSpec> GetSolutionRestoreSpec( IMonoDevelopSolutionManager solutionManager, BuildIntegratedNuGetProject project, DependencyGraphCacheContext context, CancellationToken cancellationToken) { // NuGet when restoring a single project will request the DependencyGraphSpec from every project in the // solution so we obtain this up front so it can be cached and avoid getting the package spec // individually for each project. To do this we need all the BuildIntegratedNuGetProjects in the solution. var projects = await solutionManager.GetNuGetProjectsAsync(); var buildIntegratedProjects = projects.OfType <BuildIntegratedNuGetProject> ().ToList(); return(await GetSolutionRestoreSpec(solutionManager, buildIntegratedProjects, context, cancellationToken)); }
public Task <IEnumerable <NuGetProject> > GetNuGetProjectsAsync() { return(solutionManager.GetNuGetProjectsAsync()); }