NuGet.VisualStudio 17.12.1
NuGet.VisualStudio
This package provides APIs for invoking NuGet services in Visual Studio. It contains NuGet’s older services that are available via the Managed Extensibility Framework (MEF).
Usage
After installing the package, you can use its services to interact with NuGet in Visual Studio. This can be used to install and uninstall packages, and to obtain information about installed packages.
MEF Services
From NuGet 6.0, all of these APIs are available in the package NuGet.VisualStudio. In NuGet 5.11 and earlier, the APIs in the namespace NuGet.VisualStudio
are available in the package NuGet.VisualStudio, and APIs in the namespace NuGet.SolutionRestoreManager
are available in the package NuGet.SolutionRestoreManager.Interop.
Example
Get installed packages
To use a service, import it through the MEF Import attribute, or through the IComponentModel service.
// Using the Import attribute
[Import(typeof(IVsPackageInstaller2))]
public IVsPackageInstaller2 packageInstaller;
packageInstaller.InstallLatestPackage(source: null, currentProject,
"Newtonsoft.Json", includePrerelease: false, ignoreDependencies: false);
// Using the IComponentModel service
var componentModel = (IComponentModel)GetService(typeof(SComponentModel));
IVsPackageUninstaller uninstallerServices =
componentModel.GetService<IVsPackageUninstaller>();
var uninstallerServices = installerServices.UninstallPackage(currentProject, "Newtonsoft.json", removeDependencies: true);
Additional documentation
More information about the NuGet.VisualStudio library can be found on the NuGet API docs.
No packages depend on NuGet.VisualStudio.
.NET Framework 4.7.2
- Microsoft.VisualStudio.ComponentModelHost (>= 17.10.191)
- Microsoft.VisualStudio.TemplateWizardInterface (>= 17.10.40170)
Version | Downloads | Last updated |
---|---|---|
17.12.1 | 2 | 11/20/2024 |
17.12.0 | 2 | 11/20/2024 |
17.11.1 | 2 | 11/20/2024 |
17.11.0 | 2 | 11/20/2024 |
17.11.0-preview.2 | 2 | 11/20/2024 |
17.10.2 | 1 | 12/12/2024 |
17.10.1 | 2 | 11/20/2024 |
17.10.0 | 2 | 11/20/2024 |
17.9.1 | 2 | 11/20/2024 |
17.8.1 | 2 | 11/20/2024 |
17.8.0 | 2 | 11/20/2024 |
17.7.1 | 2 | 11/20/2024 |
17.7.0 | 2 | 11/20/2024 |
17.6.2 | 2 | 11/20/2024 |
17.6.1 | 2 | 11/20/2024 |
17.6.0 | 2 | 11/20/2024 |
17.6.0-preview.3 | 2 | 11/20/2024 |
17.5.1 | 2 | 11/20/2024 |
17.5.0 | 2 | 11/20/2024 |
17.4.3 | 2 | 11/20/2024 |
17.4.2 | 2 | 11/20/2024 |
17.4.0 | 3 | 01/03/2023 |
17.3.4 | 2 | 11/20/2024 |
17.3.3 | 2 | 11/20/2024 |
17.3.1 | 2 | 11/20/2024 |
17.3.0 | 3 | 09/21/2022 |
17.2.4 | 2 | 11/20/2024 |
17.2.2 | 2 | 11/20/2024 |
17.1.0 | 2 | 11/20/2024 |
6.0.6 | 2 | 11/20/2024 |
6.0.5 | 2 | 11/20/2024 |
6.0.3-rc.1 | 2 | 11/30/2024 |
6.0.2 | 2 | 11/20/2024 |
5.11.6 | 2 | 11/20/2024 |
5.11.5 | 2 | 11/20/2024 |
5.11.3 | 2 | 11/20/2024 |
5.10.0 | 2 | 11/20/2024 |
5.9.3 | 2 | 11/20/2024 |
5.8.1 | 2 | 11/20/2024 |
5.7.3-rtm.5 | 2 | 11/30/2024 |
5.7.2 | 2 | 11/20/2024 |
5.6.0 | 2 | 11/20/2024 |
5.5.1 | 2 | 11/20/2024 |
5.4.0 | 2 | 11/20/2024 |
5.3.1 | 2 | 11/20/2024 |
5.2.1 | 2 | 11/20/2024 |
5.1.0 | 2 | 11/20/2024 |
5.0.2 | 2 | 11/20/2024 |
4.9.6 | 2 | 11/20/2024 |
4.8.2 | 2 | 11/20/2024 |
4.7.3 | 2 | 11/20/2024 |
4.6.4 | 2 | 11/20/2024 |
4.5.3 | 2 | 11/20/2024 |
4.4.3 | 2 | 11/20/2024 |
4.3.1 | 2 | 11/20/2024 |
4.2.0 | 2 | 11/20/2024 |
4.1.0 | 2 | 11/20/2024 |
4.0.0 | 2 | 11/20/2024 |
3.5.0 | 2 | 11/20/2024 |
3.3.0 | 2 | 11/20/2024 |
2.8.6 | 2 | 11/20/2024 |
2.7.2 | 2 | 11/20/2024 |
2.6.0 | 2 | 11/20/2024 |
2.5.0 | 2 | 11/20/2024 |
2.2.0 | 2 | 11/20/2024 |
2.1.0 | 2 | 11/20/2024 |