递归包括通过Gitignore的NuGet的DLL [英] Recursively include Nuget DLLs via Gitignore

查看:195
本文介绍了递归包括通过Gitignore的NuGet的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用一个新的ASP.NET MVC项目GIT。我在我的gitignore文件中的一行忽略的dll

I am using GIT with a new ASP.NET MVC project. I have a line in my gitignore file to ignore dlls

*.dll

我想沿着以下的行添加的东西,包括(即不理睬)DLL文件在我的NuGet包文件夹

I would like to add something along the lines of the following to include (i.e. do not ignore) DLLs in my NUGET packages folder

  !/packages/*.dll

我遇到的问题是,并不是所有的Nu​​Get包同样创建,并根据包装上有问题,DLL的可以嵌套在路径层级的任意数量。看来,我只需要沿着线递归的解决方案:

The problem I'm encountering is that not all nuget packages are created equally and, depending on the package in question, DLLs may be nested an arbitrary number of levels in the path hierarchy. It seems that I simply need a recursive solution along the lines of:

!/packages/**/*.dll

!/packages/**/*

我还没有找到一个解决方案,将通过mysysgit工作(或混帐的任何窗口分布)。

I have not yet found a solution that will work via mysysgit (or any windows distribution of git).

有谁知道一个办法,使这项工作?

Does anyone know of a way to make this work???

感谢

杰森

推荐答案

通过保持留下你的顶级 gitignore 单独 *。dll的在里面。

Leave your top level gitignore alone by keeping *.dll in it.

创建包目录另一个的.gitignore 文件,并把!*。dll的在里面。

Create another .gitignore file in the packages directory and put !*.dll in it.

这篇关于递归包括通过Gitignore的NuGet的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆