public Task <PackageInfo> RequireInstalledPackageInfoAsync(string packageId) { var package = _installedPackagesConfigService.RequireInstalledPackage(packageId); var path = _localPackagesConfigService.RequirePackagePath(new PackageIdentity(package.Id, package.Version)); return(_nuspecFileService.RequirePackageInfoFromNuspecAsync(path)); }
public string RequireInstalledPackageVersion(string packageId, string assemblyName) { var package = _installedPackagesConfigService.RequireInstalledPackage(packageId); if (package.InstalledInAssemblies.All(a => a != assemblyName)) { throw new PackageNotInstalledException(packageId); } return(package.Version); }