C# 如何在没有 NuGet 的情况下安装和设置 RESTSharp?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10630685/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 14:34:53  来源:igfitidea点击:

How do I install and setup RESTSharp without NuGet?

c#.netrestsharp

提问by M W

I am using Visual Studio C# 2010 Express and is learning. RESTSharp is supposed to be installed by NuGet but NuGet cannot be used with Express version. Can I still install and configure RESTSharp manually, and how?

我正在使用 Visual Studio C# 2010 Express 并且正在学习。RESTSharp 应该由 NuGet 安装,但 NuGet 不能与 Express 版本一起使用。我仍然可以手动安装和配置 RESTSharp,如何安装和配置?

采纳答案by Jon Skeet

The NuGet Visual Studio plugin can't be used with Express, but you can install NuGet packages from the command line. You'll need to download the command line bootstrapper from the NuGet CodePlex site.

NuGet Visual Studio 插件不能与 Express 一起使用,但您可以从命令行安装 NuGet 包。您需要从NuGet CodePlex 站点下载命令行引导程序。

After installing it, you can just use

安装后就可以使用了

nuget Install SomePackageName

and it will fetch the package and its dependencies to local disk. You'll need to add the project references manually though, AFAIK.

它会将包及其依赖项提取到本地磁盘。不过,您需要手动添加项目引用,AFAIK。

回答by Sachin Nayak

You could get the code from github and compile it

你可以从github获取代码并编译它

回答by bmkay

Get the dll from https://github.com/restsharp/RestSharp/downloads

https://github.com/restsharp/RestSharp/downloads获取 dll

and add it as reference to your project

并将其添加为您项目的参考