NuGet Management
Manage your NuGet packages directly from the VS Code environment.

Overview
The NuGet Management feature allows you to:
- Browse and search for NuGet packages
- Install packages to your projects
- Update existing packages
- Remove unwanted packages
- Manage package versions across your solution
Accessing the NuGet Manager
There are several ways to access the NuGet Package Manager:
- Solution Explorer: Right-click on a project or solution and select "Manage NuGet Packages"
- Command Palette: Press
Ctrl+Shift+Pand type "NuGet Manager: Open Package Manager" - Dependencies Node: Right-click on the "Dependencies" or "Packages" node in the Solution Explorer
Package Installation
To install a new NuGet package:
- Open the NuGet Package Manager
- Switch to the "Browse" tab
- Search for a package by name
- Select the package from the search results
- Choose a version from the dropdown menu
- Select which projects should receive the package
- Click "Install" to add the package
Managing Existing Packages
Viewing Installed Packages
- Open the NuGet Package Manager
- Switch to the "Installed" tab
- View all installed packages across your solution or in specific projects
Updating Packages
- Open the NuGet Package Manager
- Switch to the "Updates" tab to see available updates
- Select the packages you wish to update
- Choose the version to update to
- Click "Update" to apply the changes
Removing Packages
There are two ways to remove packages:
Via the NuGet Manager:
- Open the NuGet Package Manager
- Switch to the "Installed" tab
- Select the package you wish to remove
- Click "Uninstall" to remove the package
Via the Solution Explorer:
- Expand a project's "Dependencies" or "Packages" node
- Right-click on the package you want to remove
- Select "Remove this package" from the context menu
Package Sources
The NuGet Manager uses the same package sources as configured in your NuGet settings:
- Default sources like nuget.org
- Custom sources from your nuget.config file
To manage package sources:
- Open the NuGet Manager
- Click the settings icon in the top-right corner
- Select "Configure Package Sources"
- Add, edit, or remove package sources as needed
Restoring Packages
To restore packages for a project or solution:
- Right-click on a project or solution in the Solution Explorer
- Select "Restore NuGet packages"
Package Management in Solution Explorer
The Solution Explorer provides a hierarchical view of your packages:
- Each project has a "Dependencies" node with a "Packages" sub-node
- Expand the "Packages" node to see all installed NuGet packages
- Right-click on any package to:
- View package information
- Update the package
- Remove the package
Using Package Versions in Multiple Projects
To ensure consistent package versions across projects:
- Open the NuGet Manager at the solution level
- When installing or updating packages, select multiple projects
- The same version will be applied to all selected projects
Troubleshooting
If you encounter issues with NuGet packages:
- Try restoring packages manually
- Check the Output panel (
Ctrl+Shift+U) for NuGet errors - Verify your package sources are accessible
- Check for any package conflicts in the Error List
- Make sure your projects target compatible frameworks for the packages