NuGet.VisualStudio
17.8.0
Prefix Reserved
See the version list below for details.
dotnet add package NuGet.VisualStudio --version 17.8.0
NuGet\Install-Package NuGet.VisualStudio -Version 17.8.0
<PackageReference Include="NuGet.VisualStudio" Version="17.8.0" />
paket add NuGet.VisualStudio --version 17.8.0
#r "nuget: NuGet.VisualStudio, 17.8.0"
// Install NuGet.VisualStudio as a Cake Addin #addin nuget:?package=NuGet.VisualStudio&version=17.8.0 // Install NuGet.VisualStudio as a Cake Tool #tool nuget:?package=NuGet.VisualStudio&version=17.8.0
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Microsoft.VisualStudio.ComponentModelHost (>= 17.4.255)
- Microsoft.VisualStudio.TemplateWizardInterface (>= 17.4.33103.184)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on NuGet.VisualStudio:
Package | Downloads |
---|---|
SuntekSolutions.SkyScraper.Core
.NET SQLServer Data Access, Object Relational Mapper and Caching Library |
|
TwitterTracker
Package Description |
|
TwitterTracker.Filter
Package Description |
|
BlazorAnkitSharma
A reusable component for Blazor (with many features) |
|
AmqpServer
This is a simple Amqp wrapper to reduce boilerplate code. |
GitHub repositories (24)
Showing the top 5 popular GitHub repositories that depend on NuGet.VisualStudio:
Repository | Stars |
---|---|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
unoplatform/uno
Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
|
|
microsoft/dotnet-apiport
This repo contains .NET Portability Analyzer (VSIX and Console) libraries and tools
|
|
dotnet/project-system
The .NET Project System for Visual Studio
|
|
mrlacey/Rapid-XAML-Toolkit
A collection of tools to accelerate XAML development within Visual Studio. These include XAML analysis, XAML generations, plus templates and helpers.
|
Version | Downloads | Last updated | |
---|---|---|---|
17.12.1 | 448 | 11/12/2024 | |
17.12.0 | 96 | 11/12/2024 | |
17.11.1 | 979 | 10/1/2024 | |
17.11.0 | 617 | 8/13/2024 | |
17.11.0-preview.2 | 98 | 6/5/2024 | |
17.10.2 | 287 | 8/12/2024 | |
17.10.1 | 2,260 | 6/27/2024 | |
17.10.0 | 1,329 | 5/21/2024 | |
17.9.1 | 2,635 | 2/13/2024 | |
17.8.1 | 242 | 2/13/2024 | |
17.8.0 | 3,311 | 11/17/2023 | |
17.7.1 | 356 | 2/14/2024 | |
17.7.0 | 46,744 | 8/9/2023 | |
17.6.2 | 391 | 2/13/2024 | |
17.6.1 | 2,832 | 6/13/2023 | |
17.6.0 | 1,389 | 5/17/2023 | |
17.6.0-preview.3 | 123 | 5/17/2023 | |
17.5.1 | 478 | 6/13/2023 | |
17.5.0 | 3,187 | 2/22/2023 | |
17.4.3 | 147 | 2/13/2024 | |
17.4.2 | 248 | 6/13/2023 | |
17.4.0 | 9,961 | 11/9/2022 | |
17.3.4 | 142 | 2/13/2024 | |
17.3.3 | 187 | 6/14/2023 | |
17.3.1 | 1,504 | 10/11/2022 | |
17.2.4 | 185 | 6/14/2023 | |
17.2.2 | 4,435 | 10/11/2022 | |
17.1.0 | 65,437 | 2/16/2022 | |
6.0.6 | 175 | 2/13/2024 | |
6.0.5 | 257 | 6/13/2023 | |
6.0.3-rc.1 | 144 | 10/11/2022 | |
6.0.2 | 982 | 6/14/2022 | |
5.11.6 | 535 | 2/13/2024 | |
5.11.5 | 1,055 | 6/15/2023 | |
5.11.3 | 4,599 | 10/11/2022 | |
5.10.0 | 6,092 | 6/15/2021 | |
5.9.3 | 477 | 10/11/2022 | |
5.8.1 | 1,052 | 1/16/2021 | |
5.7.3-rtm.5 | 171 | 10/11/2022 | |
5.7.2 | 505 | 6/14/2022 | |
5.6.0 | 8,524 | 5/20/2020 | |
5.5.1 | 2,246 | 4/3/2020 | |
5.4.0 | 7,888 | 12/3/2019 | |
5.3.1 | 1,476 | 10/25/2019 | |
5.2.1 | 178 | 6/14/2022 | |
5.1.0 | 10,838 | 5/21/2019 | |
5.0.2 | 758 | 5/14/2019 | |
4.9.6 | 214 | 10/11/2022 | |
4.8.2 | 448 | 3/12/2019 | |
4.7.3 | 400 | 3/15/2019 | |
4.6.4 | 5,870 | 3/15/2019 | |
4.5.3 | 662 | 3/15/2019 | |
4.4.3 | 1,053 | 3/15/2019 | |
4.3.1 | 894 | 3/12/2019 | |
4.2.0 | 6,690 | 7/14/2017 | |
4.1.0 | 1,800 | 7/14/2017 | |
4.0.0 | 93,630 | 3/7/2017 | |
3.5.0 | 35,879 | 1/18/2017 | |
3.3.0 | 150,189 | 1/14/2016 | |
2.8.6 | 22,701 | 7/21/2015 | |
2.7.2 | 2,902 | 11/11/2013 | |
2.6.0 | 1,960 | 6/26/2013 | |
2.5.0 | 1,947 | 4/25/2013 | |
2.2.0 | 2,441 | 12/12/2012 | |
2.1.0 | 6,112 | 10/4/2012 |