Wednesday, 26 April 2017

How to add a NuGet package to C# project in VSCode on Ubuntu

In VSCode open Terminal and use dotnet CLI command package and specify the name of the desired package (e.g. Newtonsoft.Json):

$ dotnet add package Newtonsoft.Json

This will add a reference to that NuGet package in project:

Output in VSCode:

This can be verified in the project file:

VSCode notifies us that there are unresolved dependencies:

If we click on Restore newtonsoft.json library gets downloaded to ~/.nuget/packages directory.

After resolving them we can start using object from the newly added package. Intellisense also works for new dependency assembly:


Devi said...

Great post. keep sharing such a worthy information

cyber security course in bangalore
cyber security training in chennai

micheal pan said...

BE SMART AND BECOME RICH IN LESS THAN 3DAYS....It all depends on how fast 
you can be to get the new PROGRAMMED blank ATM card that is capable of
hacking into any ATM machine,anywhere in the world. I got to know about 
this BLANK ATM CARD when I was searching for job online about a month 
ago..It has really changed my life for good and now I can say I'm rich and 
I can never be poor again. The least money I get in a day with it is about 
$50,000.(fifty thousand USD) Every now and then I keeping pumping money 
into my account. Though is illegal,there is no risk of being caught 
,because it has been programmed in such a way that it is not traceable,it 
also has a technique that makes it impossible for the CCTVs to detect 
you..For details on how to get yours today, email the hackers on : ( ). Tell your 
loved once too, and start to live large. That's the simple testimony of how 
my life changed for good...Love you all ...the email address again is ;

ramyapranauv said...

Amazing blog...keep sharing
IELTS Training in Chennai
IELTS Classes in Chennai
IELTS Coaching in Chennai
IELTS Coaching centre in Chennai

Reshma said...
This comment has been removed by the author.
Reshma said...

Awesome blog. Thanks for sharing such a worthy information...
Salesforce training in bangalore
Salesforce course in bangalore

bes unn said...

Hey friend, it is very well written article, thank you for the valuable and useful information you provide in this post. Keep up the good work! FYI, please check these depression, stress and anxiety related articles.
How to Build a Portfolio with ETFs, My vision for India in 2047 postcard, Essay on Unsung Heroes of Freedom Struggle

SBPwindows said...

Nice thanks for sharing this blog, keep update more blogs.
Best UPVC Windows and Doors Manufacturer in Chennai
Best Upvc Windows and doors dealers in chennai
UPVC Doors in Chennai