在我的项目,该项目采用的NuGet使用github上

编程入门 行业动态 更新时间:2024-10-27 02:23:47
本文介绍了在我的项目,该项目采用的NuGet使用github上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我创建了一个名为防爆pressForms开源.NET的Web开发框架。我刚才上载该项目Github上: github/DanielLangdon/Ex$p$ pssForms 的。

I'm creating an open-source web development framework called "ExpressForms". I just now uploaded the project to github: github/DanielLangdon/ExpressForms.

我用的NuGet设置我的code与ASP MVC和实体框架的最新版本上运行;这些被保存在溶液下面一个包的目录。我可以看到,默认情况下,git的忽略这个目录上传我的项目github上的时候。

I used NuGet to set up my code to run with the latest versions of ASP MVC and Entity Framework; these are saved in a "packages" directory below the solution. I can see that by default, git ignores this directory when uploading my project to github.

当我从github上下载该项目到其他目录,该目录是丢失,该解决方案将无法建立。

When I download the project from github to another directory, this directory is missing and the solution won't build.

什么我需要做的,让这个其他开发人员可以轻松地从github上下载我的code和构建它马上没有任何大惊小怪?

What do I need to do to make it so that another developer can easily download my code from github and build it right away without any fuss?

我还是新来的git,所以很可能我想的东西基本的。

I am still new to git, so it's likely I'm missing something basic.

推荐答案

听起来像是你需要的启用的NuGet包在你的新下载的解决方案恢复。

Sounds like you need to enable NuGet package restore in your newly downloaded solution.

在使用的NuGet与GitHub上,GitHub上忽略在包文件目录,因为它通常不是一个好主意提交的二进制文件(如DLL库)到Git的,因为它导致的Git回购成为臃肿的规模随着时间的推移,因为他们要保持每个版本的回购历史上的一个二进制永远的(除非你回去和 git的过滤分支)。

When using NuGet with GitHub, GitHub ignores the files under the packages directory because it's usually not a good idea to commit binary files (like DLL libraries) to Git, because it causes Git repos to become bloated in size over time because they have to keep each version of a binary in the repo history forever (unless you go back and erase them with git filter-branch).

作为一种变通方法,的NuGet的设计采用了包还原,它规定任何依赖你的解决方案可能会在一个文本xml文件,这是很容易和有效地的Git版本控制。因此,只有该文件应致力于Git的。

As a workaround, NuGet was designed with "package restore", which specifies any dependencies your solution may have in a text xml file, which is easily and efficiently versioned by Git. So only that file should be committed to Git.

当您启用包还原,建立自己的解决方案,将的NuGet检查配置文件,并自动下载在其指定的任何依赖关系。

When you enable package restore and build your solution, NuGet will check the config file and automatically download any dependencies specified in it.

更多推荐

在我的项目,该项目采用的NuGet使用github上

本文发布于:2023-11-07 14:45:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566732.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:该项目   项目   github   NuGet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!