private string GetExtensionRepositoryPath(XElement packagesElement, object vsExtensionManager) { string repositoryId = packagesElement.GetOptionalAttributeValue("repositoryId"); if (repositoryId == null) { ShowErrorMessage(VsResources.TemplateWizard_MissingExtensionId); throw new WizardBackoutException(); } return(_preinstalledPackageInstaller.GetExtensionRepositoryPath(repositoryId, vsExtensionManager, ThrowWizardBackoutError)); }
public void InstallPackagesFromVSExtensionRepository(string extensionId, bool isPreUnzipped, bool skipAssemblyReferences, bool ignoreDependencies, Project project, IDictionary <string, string> packageVersions) { if (String.IsNullOrEmpty(extensionId)) { throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "extensionId"); } if (project == null) { throw new ArgumentNullException("project"); } if (packageVersions.IsEmpty()) { throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "packageVersions"); } var preinstalledPackageInstaller = new PreinstalledPackageInstaller(_websiteHandler, _packageServices, _vsCommonOperations, _solutionManager); var repositoryPath = preinstalledPackageInstaller.GetExtensionRepositoryPath(extensionId, _vsExtensionManager, ThrowError); var config = GetPreinstalledPackageConfiguration(isPreUnzipped, skipAssemblyReferences, ignoreDependencies, packageVersions, repositoryPath); preinstalledPackageInstaller.PerformPackageInstall(this, project, config, RepositorySettings, ShowWarning, ThrowError); }
public void InstallPackagesFromVSExtensionRepository(string extensionId, bool isPreUnzipped, bool skipAssemblyReferences, bool ignoreDependencies, Project project, IDictionary<string, string> packageVersions) { if (String.IsNullOrEmpty(extensionId)) { throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "extensionId"); } if (project == null) { throw new ArgumentNullException("project"); } if (packageVersions.IsEmpty()) { throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "packageVersions"); } var preinstalledPackageInstaller = new PreinstalledPackageInstaller(_websiteHandler, _packageServices, _vsCommonOperations, _solutionManager); var repositoryPath = preinstalledPackageInstaller.GetExtensionRepositoryPath(extensionId, _vsExtensionManager, ThrowError); var config = GetPreinstalledPackageConfiguration(isPreUnzipped, skipAssemblyReferences, ignoreDependencies, packageVersions, repositoryPath); preinstalledPackageInstaller.PerformPackageInstall(this, project, config, RepositorySettings, ShowWarning, ThrowError); }