Search code examples
c#.netlinuxrider

How to add/use C# libraries in JetBrains Rider?


I am trying to use HttpClient client however I am unable to use using System.Net.Http;. How to correctly use C# libraries in JetBrains Rider?

enter image description here

The os is linux.


Solution

  • System.Net.Http is not a standard reference included with console applications. You will need to add the reference explicitly to use it.

    You can do this in Rider by right clicking the project in question, selecting Add > Add Reference. This will pop a dialog that will populate the system references. Once populated, find System.Net.Http and select it. Confirm the dialog. Your using should now work as expected.

    Tested with Rider 2018.1 on windows.