May 14th, 2024

Announcing NuGet Commands in C# Dev Kit

Allie Barry
Product Manager

With the April release of C# Dev Kit, you can now manage your NuGet packages directly from Visual Studio Code using the new commands in the command palette.

To add a NuGet package to your project, use the command “NuGet: Add NuGet Package”. If you have more than one project in your solution, you will be asked to select which project you want to add the package to. Then you can search for packages by name. Then select the version you want to apply. Once you select a package, C# Dev Kit will add it to your project and update your project file and references. To update or remove a NuGet package from your project, use the commands “NuGet: Update NuGet Package” and “NuGet: Remove NuGet Package.” These commands will show you a list of the packages that are currently installed in your project and let you choose which ones you want to update or remove. C# Dev Kit will then perform the necessary changes and update your project file and references.

Here is an example of how to use the commands to add, update, and remove NuGet packages in Visual Studio Code:

We would love to hear your feedback and suggestions for more features and functionality to be added to our C# Dev Kit NuGet experience. Please Report an issue through VS Code, open an issue on GitHub, or leave a comment below!

Author

Allie Barry
Product Manager

Alexandra Barry is a Product Manager on the .NET team.

6 comments

Discussion is closed. Login to edit/delete existing comments.

  • Paulo Pinto

    While already something versus manually editing the project file, it would be better to have a graphical way similar to VS proper, or JetBrains Rider.

  • Alex

    Very, very inconvenient package management(

    • saint4eva

      Yea, the package manager is too commandline centric. I use a VS code extension for Nugget – very nice with a good UI

  • mumti shah

    The embedded video shows nothing in the Edge browser. Works fine in Chrome.

    • saint4eva

      It works well on Microsoft Edge browser – that’s what I use.

    • Paulo Pinto

      It also fails on Firefox.