Greg
Greg

Reputation: 8945

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.

Upvotes: 7

Views: 25866

Answers (1)

Jonathon Chase
Jonathon Chase

Reputation: 9704

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.

Upvotes: 6

Related Questions