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?
The os is linux.
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?
The os is linux.
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.
System.Net.Http
NuGet package instead of attempting to path to it directly, as that is likely to break the project in other people's environments. –
Artifice © 2022 - 2024 — McMap. All rights reserved.