简体   繁体   中英

Unable to add RestSharp as reference into Visual Studio 2019

I have created a console C# application to call REST API to send data to the external application using RESTSHARP. NuGet.Framework package is added to the solution but unable to add RESTSHARP as reference. Can anyone give any input on this to resolve the issue?

You installed the wrong nuget. You don't need the NuGet.Frameworks package, that's unrelated to your needs.

You need to add the RestSharp nuget to your ExternalWebServiceConsumpTest project

To do so, please do the following:

  1. Right click on your ExternalWebServiceConsumpTest project
  2. Then click "Manage NuGet Packages"
  3. Make sure the Package Source is set to "nuget.org"
  4. In the search bar, type RestSharp and hit enter
  5. Select the RestSharp package and install it to your ExternalWebServiceConsumpTest project

Now, your code should be able to find the RestSharp namespace

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM