Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

.net

linux

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.

like image 303
Greg Avatar asked May 22 '18 00:05

Greg


People also ask

How do I use C on my computer?

It is a bit more cryptic in its style than some other languages, but you get beyond that fairly quickly. C is what is called a compiled language. This means that once you write your C program, you must run it through a C compiler to turn your program into an executable that the computer can run (execute).

What is & use in C?

& means the address-of, you will see that in placeholders for functions to modify the parameter variable as in C, parameter variables are passed by value, using the ampersand means to pass by reference. * means the dereference of a pointer variable, meaning to get the value of that pointer variable.

How do you multiply in C?

Program to Multiply Two Numbers printf("Enter two numbers: "); scanf("%lf %lf", &a, &b); Then, the product of a and b is evaluated and the result is stored in product . product = a * b; Finally, product is displayed on the screen using printf() .


1 Answers

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.

like image 70
Jonathon Chase Avatar answered Nov 03 '22 01:11

Jonathon Chase