git 从 GitHub 安装 nuget 包
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34760754/
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
Installing nuget package from GitHub
提问by Tony
The command: Install-Package curve25519-uwp installs version 1.0.3 of this package (https://www.nuget.org/packages/curve25519-uwp/)
命令:Install-Package curve25519-uwp 安装此包的 1.0.3 版(https://www.nuget.org/packages/curve25519-uwp/)
On GitHub there is a version 1.0.4 that fixes a specific error I am facing.
在 GitHub 上有一个版本 1.0.4 修复了我面临的一个特定错误。
Can anyone explain how to get that package installed?
谁能解释一下如何安装该软件包?
I am using visual studio 2015 community edition with git tools installed.
我正在使用安装了 git 工具的 Visual Studio 2015 社区版。
回答by Philippe
With NuGet, there is no way to take a pre-version from a Git repository.
使用 NuGet,无法从 Git 存储库中获取预版本。
You could:
你可以:
Ask for the release of a new version of the NuGet package, or at least a pre-release.
Clone the repository, build the version, and replace the NuGet package with a local dependency. (Not a good solution!)
Like the above, but put it in your own NuGet server.
Manage the repository as a Git submodule.
Switch from NuGet to Paketwhich supports references toward a Git repository. (Surely the best solution if your case could appear often.)
要求发布 NuGet 包的新版本,或者至少是预发布版本。
克隆存储库,构建版本,并使用本地依赖项替换 NuGet 包。(不是一个好的解决方案!)
像上面一样,但把它放在你自己的 NuGet 服务器中。
将存储库作为 Git 子模块进行管理。
从 NuGet 切换到支持 Git 存储库引用的Paket。(如果您的案例经常出现,那当然是最好的解决方案。)