Example #1
0
        public static FilePath GetPackagesFolderPath(this DotNetProject project)
        {
            var solutionManager = PackageManagementServices.Workspace.GetSolutionManager(project.ParentSolution);

            if (solutionManager == null)
            {
                return(FilePath.Null);
            }

            NuGetProject nugetProject = solutionManager.GetNuGetProject(new DotNetProjectProxy(project));

            if (nugetProject == null)
            {
                return(FilePath.Null);
            }

            return(nugetProject.GetPackagesFolderPath(solutionManager));
        }
        protected void CreateInitNuGetProject()
        {
            var solutionManager = PackageManagementServices.Workspace.GetSolutionManager(project.ParentSolution);

            nugetProject = solutionManager.GetNuGetProject(project);

            if (nugetProject is INuGetIntegratedProject)
            {
                PackagesFolderPath  = SettingsUtility.GetGlobalPackagesFolder(solutionManager.Settings);
                packagePathResolver = new VersionFolderPathResolver(
                    PackagesFolderPath);
            }
            else
            {
                PackagesFolderPath = nugetProject.GetPackagesFolderPath(solutionManager);
                folder             = new FolderNuGetProject(PackagesFolderPath);
            }
        }
Example #3
0
        public static FilePath GetPackagesFolderPath(this DotNetProject project)
        {
            var solutionManager = new MonoDevelopSolutionManager(project.ParentSolution);

            if (solutionManager == null)
            {
                return(FilePath.Null);
            }

            NuGetProject nugetProject = solutionManager.GetNuGetProject(new DotNetProjectProxy(project));

            if (nugetProject == null)
            {
                return(FilePath.Null);
            }

            return(nugetProject.GetPackagesFolderPath(solutionManager));
        }
		protected void CreateInitNuGetProject ()
		{
			var solutionManager = PackageManagementServices.Workspace.GetSolutionManager (project.ParentSolution);
			nugetProject = solutionManager.GetNuGetProject (project);

			if (nugetProject is INuGetIntegratedProject) {
				PackagesFolderPath = SettingsUtility.GetGlobalPackagesFolder (solutionManager.Settings); 
				packagePathResolver = new VersionFolderPathResolver ( 
					PackagesFolderPath, 
					normalizePackageId: false);
			} else {
				PackagesFolderPath = nugetProject.GetPackagesFolderPath (solutionManager);
				folder = new FolderNuGetProject (PackagesFolderPath);
			}
		}