Esempio n. 1
0
        private static NuGetVersion GetNuGetVersion(PackageReference package, NuGetSourceRepositoryProvider sourceRepositoryProvider, NuGetFramework targetFramework, ILogger logger)
        {
            if (package.Parameters.ContainsKey("version"))
            {
                return(new NuGetVersion(package.Parameters["version"].First()));
            }

            var includePrerelease = package.IsPrerelease();

            foreach (var sourceRepository in sourceRepositoryProvider.GetRepositories())
            {
                var dependencyInfoResource = sourceRepository.GetResourceAsync <DependencyInfoResource>().Result;
                var dependencyInfo         = dependencyInfoResource.ResolvePackages(package.Package, targetFramework, logger, CancellationToken.None).Result;
                var version = dependencyInfo
                              .Where(p => p.Listed && (includePrerelease || !p.Version.IsPrerelease))
                              .OrderByDescending(p => p.Version, VersionComparer.Default)
                              .Select(p => p.Version)
                              .FirstOrDefault();

                if (version != null)
                {
                    return(version);
                }
            }
            return(null);
        }
Esempio n. 2
0
        public IReadOnlyCollection <IFile> GetFiles(DirectoryPath directoryPath, PackageReference packageReference, PackageType type)
        {
            var files = new List <IFile>();

            foreach (var installedPackage in _installedPackages)
            {
                if (_blackListedPackages.Contains(installedPackage.Id))
                {
                    const string format = "Package {0} depends on package {1}. This dependency won't be loaded.";
                    _log.Debug(format, packageReference.Package, installedPackage.ToString());
                    continue;
                }

                var installPath = new DirectoryPath(_pathResolver.GetInstallPath(installedPackage));
                if (!_fileSystem.Exist(installPath))
                {
                    _log.Warning("Package {0} is not installed.", installedPackage.Id);
                    continue;
                }

                // If the installed package is not the target package, create a new PackageReference
                // which is passed to the content resolver. This makes logging make more sense.
                var installedPackageReference = installedPackage.Id.Equals(packageReference.Package, StringComparison.OrdinalIgnoreCase) ?
                                                packageReference :
                                                new PackageReference($"nuget:?package={installedPackage.Id}");

                files.AddRange(_contentResolver.GetFiles(installPath, installedPackageReference, type));
            }

            return(files);
        }
Esempio n. 3
0
 public bool CanInstall(PackageReference package, PackageType type)
 {
     if (package == null)
     {
         throw new ArgumentNullException(nameof(package));
     }
     return(package.Scheme.Equals("nuget", StringComparison.OrdinalIgnoreCase));
 }
Esempio n. 4
0
        public IReadOnlyCollection <IFile> Install(PackageReference package, PackageType type, DirectoryPath path)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            var packageRoot              = path.MakeAbsolute(_environment).FullPath;
            var targetFramework          = type == PackageType.Addin ? _currentFramework : NuGetFramework.AnyFramework;
            var sourceRepositoryProvider = new NuGetSourceRepositoryProvider(_nugetSettings, _config, package);
            var packageIdentity          = GetPackageId(package, sourceRepositoryProvider, targetFramework, _nugetLogger);

            if (packageIdentity == null)
            {
                return(Array.Empty <IFile>());
            }

            var pathResolver   = new PackagePathResolver(packageRoot);
            var project        = new NugetFolderProject(_fileSystem, _contentResolver, _config, _log, pathResolver, packageRoot, targetFramework);
            var packageManager = new NuGetPackageManager(sourceRepositoryProvider, _nugetSettings, project.Root)
            {
                PackagesFolderNuGetProject = project
            };
            var includePrerelease  = package.IsPrerelease();
            var dependencyBehavior = GetDependencyBehavior(type, package);
            var resolutionContext  = new ResolutionContext(dependencyBehavior, includePrerelease, false, VersionConstraints.None, _gatherCache);
            var projectContext     = new NuGetProjectContext(_log);

            using (var sourceCacheContext = new SourceCacheContext())
            {
                var downloadContext = new PackageDownloadContext(sourceCacheContext);

                // First get the install actions.
                // This will give us the list of packages to install, and which feed should be used.
                var actions = packageManager.GetInstallProjectActionsAsync(
                    project,
                    packageIdentity,
                    resolutionContext,
                    projectContext,
                    sourceRepositoryProvider.GetRepositories(),
                    CancellationToken.None).Result;

                // Then install the packages.
                packageManager.ExecuteNuGetProjectActionsAsync(
                    project,
                    actions,
                    projectContext,
                    downloadContext,
                    CancellationToken.None).Wait();
            }

            return(project.GetFiles(path, package, type));
        }
        public IReadOnlyCollection <IFile> Install(PackageReference package, PackageType type, DirectoryPath path)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            var packageRoot              = path.MakeAbsolute(_environment).FullPath;
            var targetFramework          = type == PackageType.Addin ? _currentFramework : NuGetFramework.AnyFramework;
            var sourceRepositoryProvider = new NuGetSourceRepositoryProvider(_nugetSettings, _config, package);

            sourceRepositoryProvider.CreateRepository(packageRoot);
            var packageIdentity = GetPackageId(package, sourceRepositoryProvider, targetFramework, _nugetLogger);

            if (packageIdentity == null)
            {
                return(Array.Empty <IFile>());
            }

            if (!_projects.TryGetValue(type, out var project))
            {
                var pathResolver = new PackagePathResolver(packageRoot);
                project = new NugetFolderProject(_fileSystem, _contentResolver, _config, _log, pathResolver, packageRoot, targetFramework);
                _projects.Add(type, project);

                if (!project.Root.Equals(packageRoot))
                {
                    // This should not happen since all addins/tools are installed to same directory.
                    throw new ArgumentException($"Path is not same as previous package of type: {type}", nameof(path));
                }
            }
            var packageManager = new NuGetPackageManager(sourceRepositoryProvider, _nugetSettings, project.Root)
            {
                PackagesFolderNuGetProject = project
            };

            var sourceRepositories = sourceRepositoryProvider.GetRepositories();
            var includePrerelease  = false;

            if (package.Parameters.ContainsKey("prerelease"))
            {
                bool.TryParse(package.Parameters["prerelease"].FirstOrDefault() ?? bool.TrueString, out includePrerelease);
            }
            var resolutionContext = new ResolutionContext(DependencyBehavior.Lowest, includePrerelease, false, VersionConstraints.None, project.GatherCache);
            var projectContext    = new NuGetProjectContext(_log);

            packageManager.InstallPackageAsync(project, packageIdentity, resolutionContext, projectContext,
                                               sourceRepositories, Array.Empty <SourceRepository>(),
                                               CancellationToken.None).Wait();

            return(project.GetFiles(path, package, type));
        }
Esempio n. 6
0
 private DependencyBehavior GetDependencyBehavior(PackageType type, PackageReference package)
 {
     if (type == PackageType.Addin)
     {
         return(package.ShouldLoadDependencies(_config) ?
                DependencyBehavior.Lowest :
                DependencyBehavior.Ignore);
     }
     return(DependencyBehavior.Ignore);
 }
Esempio n. 7
0
        public IReadOnlyCollection <IFile> GetFiles(DirectoryPath directoryPath, PackageReference packageReference, PackageType type)
        {
            bool loadDependencies;

            if (packageReference.Parameters.ContainsKey("LoadDependencies"))
            {
                bool.TryParse(packageReference.Parameters["LoadDependencies"].FirstOrDefault() ?? bool.TrueString, out loadDependencies);
            }
            else
            {
                bool.TryParse(_config.GetValue(Constants.NuGet.LoadDependencies) ?? bool.FalseString, out loadDependencies);
            }

            var files       = new List <IFile>();
            var package     = _installedPackages.First(p => p.Id.Equals(packageReference.Package, StringComparison.OrdinalIgnoreCase));
            var installPath = new DirectoryPath(_pathResolver.GetInstallPath(package));

            if (!_fileSystem.Exist(installPath))
            {
                _log.Warning("Package {0} is not installed.", packageReference.Package);
                return(Array.Empty <IFile>());
            }

            files.AddRange(_contentResolver.GetFiles(installPath, packageReference, type));

            if (loadDependencies)
            {
                foreach (var dependency in _installedPackages
                         .Where(p => !p.Id.Equals(packageReference.Package, StringComparison.OrdinalIgnoreCase)))
                {
                    if (_blackListedPackages.Contains(dependency.Id))
                    {
                        _log.Warning("Package {0} depends on package {1}. Will not load this dependency...",
                                     packageReference.Package, dependency.ToString());
                        continue;
                    }

                    var dependencyInstallPath = new DirectoryPath(_pathResolver.GetInstallPath(dependency));

                    if (!_fileSystem.Exist(dependencyInstallPath))
                    {
                        _log.Warning("Package {0} is not installed.", dependency.Id);
                        continue;
                    }

                    files.AddRange(_contentResolver.GetFiles(dependencyInstallPath, packageReference, type));
                }
            }

            return(files);
        }
Esempio n. 8
0
        private static NuGetVersion GetNuGetVersion(PackageReference package, NuGetPackageManager packageManager, NuGetSourceRepositoryProvider sourceRepositoryProvider, NuGetFramework targetFramework, SourceCacheContext sourceCacheContext, ILogger logger)
        {
            if (package.Parameters.ContainsKey("version"))
            {
                return(new NuGetVersion(package.Parameters["version"].First()));
            }

            // Only search for latest version in local and primary sources.
            var repositories = new HashSet <SourceRepository>(new SourceRepositoryComparer());

            repositories.Add(packageManager.PackagesFolderSourceRepository);
            repositories.AddRange(packageManager.GlobalPackageFolderRepositories);
            repositories.AddRange(sourceRepositoryProvider.GetPrimaryRepositories());

            var          includePrerelease = package.IsPrerelease();
            NuGetVersion version           = null;

            foreach (var sourceRepository in repositories)
            {
                try
                {
                    var dependencyInfoResource = sourceRepository.GetResourceAsync <DependencyInfoResource>().Result;
                    var dependencyInfo         = dependencyInfoResource.ResolvePackages(package.Package, targetFramework, sourceCacheContext, logger, CancellationToken.None).Result;
                    var foundVersion           = dependencyInfo
                                                 .Where(p => p.Listed && (includePrerelease || !p.Version.IsPrerelease))
                                                 .OrderByDescending(p => p.Version, VersionComparer.Default)
                                                 .Select(p => p.Version)
                                                 .FirstOrDefault();

                    // Find the highest possible version
                    version = version ?? foundVersion;
                    if (foundVersion != null &&
                        version != null &&
                        foundVersion > version)
                    {
                        version = foundVersion;
                    }
                }
                catch (AggregateException ae)
                {
                    ae.Handle(e =>
                    {
                        logger.LogWarning(e.Message);
                        return(true);
                    });
                }
            }
            return(version);
        }
Esempio n. 9
0
        private static NuGetVersion GetNuGetVersion(PackageReference package, IEnumerable <SourceRepository> repositories, NuGetFramework targetFramework, SourceCacheContext sourceCacheContext, ILogger logger)
        {
            NuGetVersion version      = null;
            VersionRange versionRange = null;

            if (package.Parameters.ContainsKey("version"))
            {
                var versionString = package.Parameters["version"].First();
                if (NuGetVersion.TryParse(versionString, out version))
                {
                    return(version);
                }
                VersionRange.TryParse(versionString, out versionRange);
            }

            var includePrerelease = package.IsPrerelease();

            foreach (var sourceRepository in repositories)
            {
                try
                {
                    var dependencyInfoResource = sourceRepository.GetResourceAsync <DependencyInfoResource>().Result;
                    var dependencyInfo         = dependencyInfoResource.ResolvePackages(package.Package, targetFramework, sourceCacheContext, logger, CancellationToken.None).Result;
                    var foundVersions          = dependencyInfo
                                                 .Where(p => p.Listed && (includePrerelease || !p.Version.IsPrerelease))
                                                 .OrderByDescending(p => p.Version, VersionComparer.Default)
                                                 .Select(p => p.Version);
                    var foundVersion = versionRange != null?versionRange.FindBestMatch(foundVersions) : foundVersions.FirstOrDefault();

                    // Find the highest possible version
                    if (version == null || foundVersion > version)
                    {
                        version = foundVersion;
                    }
                }
                catch (AggregateException ae)
                {
                    ae.Handle(e =>
                    {
                        logger.LogWarning(e.Message);
                        return(true);
                    });
                }
            }
            return(version);
        }
Esempio n. 10
0
        public IReadOnlyCollection <IFile> GetFiles(DirectoryPath directoryPath, PackageReference packageReference, PackageType type)
        {
            var loadDependencies = packageReference.ShouldLoadDependencies(_config);

            var files       = new List <IFile>();
            var package     = _installedPackages.First(p => p.Id.Equals(packageReference.Package, StringComparison.OrdinalIgnoreCase));
            var installPath = new DirectoryPath(_pathResolver.GetInstallPath(package));

            if (!_fileSystem.Exist(installPath))
            {
                _log.Warning("Package {0} is not installed.", packageReference.Package);
                return(Array.Empty <IFile>());
            }

            files.AddRange(_contentResolver.GetFiles(installPath, packageReference, type));

            if (loadDependencies)
            {
                foreach (var dependency in _installedPackages
                         .Where(p => !p.Id.Equals(packageReference.Package, StringComparison.OrdinalIgnoreCase)))
                {
                    if (_blackListedPackages.Contains(dependency.Id))
                    {
                        _log.Warning("Package {0} depends on package {1}. Will not load this dependency...",
                                     packageReference.Package, dependency.ToString());
                        continue;
                    }

                    var dependencyInstallPath = new DirectoryPath(_pathResolver.GetInstallPath(dependency));

                    if (!_fileSystem.Exist(dependencyInstallPath))
                    {
                        _log.Warning("Package {0} is not installed.", dependency.Id);
                        continue;
                    }

                    files.AddRange(_contentResolver.GetFiles(dependencyInstallPath, packageReference, type));
                }
            }

            return(files);
        }
Esempio n. 11
0
        public IReadOnlyCollection <IFile> Install(PackageReference package, PackageType type, DirectoryPath path)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            var packageRoot              = path.MakeAbsolute(_environment).FullPath;
            var targetFramework          = type == PackageType.Addin ? _currentFramework : NuGetFramework.AnyFramework;
            var sourceRepositoryProvider = new NuGetSourceRepositoryProvider(_nugetSettings, _config, package);

            sourceRepositoryProvider.CreateRepository(packageRoot);
            var packageIdentity = GetPackageId(package, sourceRepositoryProvider, targetFramework, _nugetLogger);

            if (packageIdentity == null)
            {
                return(Array.Empty <IFile>());
            }

            var pathResolver   = new PackagePathResolver(packageRoot);
            var project        = new NugetFolderProject(_fileSystem, _contentResolver, _config, _log, pathResolver, packageRoot, targetFramework);
            var packageManager = new NuGetPackageManager(sourceRepositoryProvider, _nugetSettings, project.Root)
            {
                PackagesFolderNuGetProject = project
            };
            var sourceRepositories = sourceRepositoryProvider.GetRepositories();
            var includePrerelease  = package.IsPrerelease();
            var dependencyBehavior = GetDependencyBehavior(type, package);
            var resolutionContext  = new ResolutionContext(dependencyBehavior, includePrerelease, false, VersionConstraints.None, _gatherCache);
            var projectContext     = new NuGetProjectContext(_log);

            packageManager.InstallPackageAsync(project, packageIdentity, resolutionContext, projectContext,
                                               sourceRepositories, Array.Empty <SourceRepository>(),
                                               CancellationToken.None).Wait();

            return(project.GetFiles(path, package, type));
        }
Esempio n. 12
0
        private static PackageIdentity GetPackageId(PackageReference package, NuGetSourceRepositoryProvider sourceRepositoryProvider, NuGetFramework targetFramework, ILogger logger)
        {
            var version = GetNuGetVersion(package, sourceRepositoryProvider, targetFramework, logger);

            return(version == null ? null : new PackageIdentity(package.Package, version));
        }
        public NuGetSourceRepositoryProvider(ISettings settings, ICakeConfiguration config, PackageReference package, string packagesRoot)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            if (config is null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            if (package is null)
            {
                throw new ArgumentNullException(nameof(package));
            }

            // Create the default v3 resource provider
            _resourceProviders = new List <Lazy <INuGetResourceProvider> >();
            _resourceProviders.AddRange(Repository.Provider.GetCoreV3());

            // Add repositories
            var sourceComparer = new NuGetSourceRepositoryComparer();

            _repositories        = new HashSet <SourceRepository>(sourceComparer);
            _primaryRepositories = new HashSet <SourceRepository>(sourceComparer);
            _localRepositories   = new HashSet <SourceRepository>(sourceComparer);
            _localRepositories.Add(CreateRepository(packagesRoot));
            _localRepositories.Add(CreateRepository(SettingsUtility.GetGlobalPackagesFolder(settings)));
            _localRepositories.AddRange(SettingsUtility.GetFallbackPackageFolders(settings).Select(CreateRepository));

            var packageSources = new PackageSourceProvider(settings).LoadPackageSources().ToList();

            if (package.Address != null)
            {
                var repository = GetOrCreateRepository(package.Address.AbsoluteUri);

                // Sources specified in directive is always primary.
                _repositories.Add(repository);
                _primaryRepositories.Add(repository);
            }

            var nugetSources = config.GetValue(Constants.NuGet.Source);

            if (!string.IsNullOrEmpty(nugetSources))
            {
                foreach (var nugetSource in nugetSources.Split(';'))
                {
                    if (!string.IsNullOrWhiteSpace(nugetSource))
                    {
                        var repository = GetOrCreateRepository(nugetSource);
                        _repositories.Add(repository);

                        // If source is not specified in directive, add it as primary source.
                        if (package.Address == null)
                        {
                            _primaryRepositories.Add(repository);
                        }
                    }
                }
            }
            else
            {
                // Only add sources added via NuGet.config if nuget_source configuration value is not specified.
                foreach (var source in packageSources)
                {
                    if (source.IsEnabled)
                    {
                        var repository = CreateRepository(source);
                        _repositories.Add(repository);

                        // If source is not specified in directive, add it as primary source.
                        if (package.Address == null)
                        {
                            _primaryRepositories.Add(repository);
                        }
                    }
                }
            }

            SourceRepository GetOrCreateRepository(string source)
            {
                var packageSource = packageSources
                                    .Where(p => p.IsEnabled)
                                    .FirstOrDefault(p => p.Source.Equals(source, StringComparison.OrdinalIgnoreCase));

                return(packageSource == null?
                       CreateRepository(source) :
                           CreateRepository(packageSource));
            }
        }
Esempio n. 14
0
        private static PackageIdentity GetPackageId(PackageReference package, IEnumerable <SourceRepository> repositories, NuGetFramework targetFramework, SourceCacheContext sourceCacheContext, ILogger logger)
        {
            var version = GetNuGetVersion(package, repositories, targetFramework, sourceCacheContext, logger);

            return(version == null ? null : new PackageIdentity(package.Package, version));
        }
Esempio n. 15
0
        public IReadOnlyCollection <IFile> Install(PackageReference package, PackageType type, DirectoryPath path)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            var packageRoot              = path.MakeAbsolute(_environment).FullPath;
            var targetFramework          = type == PackageType.Addin ? _currentFramework : NuGetFramework.AnyFramework;
            var sourceRepositoryProvider = new NuGetSourceRepositoryProvider(_nugetSettings, _config, package, packageRoot);

            var localAndPrimaryRepositories = new HashSet <SourceRepository>(new NuGetSourceRepositoryComparer());

            localAndPrimaryRepositories.AddRange(sourceRepositoryProvider.LocalRepositories);
            localAndPrimaryRepositories.AddRange(sourceRepositoryProvider.PrimaryRepositories);

            var allRepositories = new HashSet <SourceRepository>(new NuGetSourceRepositoryComparer());

            allRepositories.AddRange(localAndPrimaryRepositories);
            allRepositories.AddRange(sourceRepositoryProvider.Repositories);

            var packageIdentity = GetPackageId(package, localAndPrimaryRepositories, targetFramework, _sourceCacheContext, _nugetLogger);

            if (packageIdentity == null)
            {
                _log.Debug("No package identity returned.");
                return(Array.Empty <IFile>());
            }

            if (packageIdentity.Version.IsPrerelease && !package.IsPrerelease())
            {
                // If a prerelease version is explicitly specified, we should install that with or without prerelease flag.
                _log.Debug("Prerelease version string explicitly specified. Installing prerelease package version.");
            }

            var pathResolver       = new PackagePathResolver(packageRoot);
            var dependencyBehavior = GetDependencyBehavior(type, package);
            var downloadContext    = new PackageDownloadContext(_sourceCacheContext);

            var availablePackages = new HashSet <SourcePackageDependencyInfo>(PackageIdentityComparer.Default);

            GetPackageDependencies(packageIdentity,
                                   targetFramework,
                                   _sourceCacheContext,
                                   _nugetLogger,
                                   allRepositories,
                                   availablePackages,
                                   dependencyBehavior,
                                   localAndPrimaryRepositories);

            var resolverContext = new PackageResolverContext(
                dependencyBehavior,
                new[] { packageIdentity.Id },
                Enumerable.Empty <string>(),
                Enumerable.Empty <global::NuGet.Packaging.PackageReference>(),
                Enumerable.Empty <PackageIdentity>(),
                availablePackages,
                allRepositories.Select(s => s.PackageSource),
                NullLogger.Instance);

            var resolver          = new PackageResolver();
            var packagesToInstall = resolver.Resolve(resolverContext, CancellationToken.None)
                                    .Select(p => availablePackages.Single(x => PackageIdentityComparer.Default.Equals(x, p))).ToArray();

            if (packagesToInstall.Length == 0)
            {
                _log.Debug("No packages to install after running package resolver.");
            }

            var packageExtractionContext = new PackageExtractionContext(
                PackageSaveMode.Nuspec | PackageSaveMode.Files | PackageSaveMode.Nupkg,
                XmlDocFileSaveMode.None,
                ClientPolicyContext.GetClientPolicy(_nugetSettings, _nugetLogger),
                _nugetLogger);

            var installedFiles = new List <IFile>();

            foreach (var packageToInstall in packagesToInstall)
            {
                var isTargetPackage = packageToInstall.Id.Equals(package.Package, StringComparison.OrdinalIgnoreCase);
                var installPath     = new DirectoryPath(pathResolver.GetInstallPath(packageToInstall));
                if (!_fileSystem.Exist(installPath))
                {
                    var downloadResource = packageToInstall.Source.GetResourceAsync <DownloadResource>(CancellationToken.None).GetAwaiter().GetResult();
                    var downloadResult   = downloadResource.GetDownloadResourceResultAsync(
                        packageToInstall,
                        downloadContext,
                        SettingsUtility.GetGlobalPackagesFolder(_nugetSettings),
                        _nugetLogger, CancellationToken.None).GetAwaiter().GetResult();

                    PackageExtractor.ExtractPackageAsync(
                        downloadResult.PackageSource,
                        downloadResult.PackageStream,
                        pathResolver,
                        packageExtractionContext,
                        CancellationToken.None).GetAwaiter().GetResult();

                    // If this is the target package, to avoid problems with casing, get the actual install path from the nuspec
                    if (isTargetPackage)
                    {
                        installPath = new DirectoryPath(pathResolver.GetInstallPath(downloadResult.PackageReader.GetIdentity()));
                    }
                }

                if (_denyListPackages.Contains(packageToInstall.Id))
                {
                    const string format = "Package {0} depends on package {1}. This dependency won't be loaded.";
                    _log.Debug(format, package.Package, packageToInstall.ToString());
                    continue;
                }

                // If the installed package is not the target package, create a new PackageReference
                // which is passed to the content resolver. This makes logging make more sense.
                var installedPackageReference = isTargetPackage ? package : new PackageReference($"nuget:?package={packageToInstall.Id}");
                var assemblies = _contentResolver.GetFiles(installPath, installedPackageReference, type);
                if (assemblies.Count == 0)
                {
                    _log.Debug("No assemblies found after running content resolver.");
                }
                installedFiles.AddRange(assemblies);
            }

            return(installedFiles);
        }