Visual Studio 中的包目录是什么?我应该将它包含在 SVN 中吗? [英] What is the packages directory in Visual Studio? Should I include it in SVN?

查看:31
本文介绍了Visual Studio 中的包目录是什么?我应该将它包含在 SVN 中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次在 Visual Studio 2010 中使用 ASP.NET MVC 4,并且我使用 SVN 控制源代码.我曾经在 Visual Studio 2008 中使用 MVC 1,在那里我有自己的 svn:ignore 过滤器

I'm working with ASP.NET MVC 4 in Visual Studio 2010 for the first time, and I control source code with SVN. I used to work with MVC 1 in Visual Studio 2008, where I had my own filter for svn:ignore

*.pdb
*.exe
*.dll
debug/*
release/*
*.user
*.suo 
obj/*
bin/*
obj
bin
VSMacros80
Thumbs.db
_ReSharper.*

但它现在不以同样的方式应用,因为项目有一些新文件夹,如 packages 文件夹,我不知道其中哪些必须进行版本控制.

but it doesn't apply in the same way now because the project has some new folders, as the packages folder, and I don't know which of them must be versioned.

关于包文件夹,我应该将其包含在存储库中还是必须忽略此文件夹?我应该忽略哪些其他文件夹或文件?

About the packages folder, should I include it the repository or this folder must be ignored? What other folders or files should I ignore?

推荐答案

听起来您正在使用 NuGet包文件夹是 NuGet 包文件夹.如果您不介意添加几个大但很少更改的二进制文件,您可以将其提交给源代码控制.

It sounds like you are using NuGet and the packages folder is the NuGet packages folder. You can commit this to source control if you do not mind adding several large but infrequently changing binaries.

或者,您可以从源代码管理中省略它并配置 NuGet如果开发人员和构建机器根据需要下载它,则在每个构建中下载包.这也会导致有人下载较新版本并导致冲突的危险.

Alternatively, you can omit it from source control and configure NuGet to download packages on each build if developers and the build machine are to download it as required. This also runs the danger of someone downloading a newer version and causing conflicts.

至于其他排除表单源代码控制的文件,参见哪些 .net 文件应该从源代码管理中排除?对于 .Net 项目,我应该从源代码管理中排除哪些文件扩展名?.

As for other files to exclude form source control, see What .net files should be excluded from source control? and For a .Net project, what file extensions should I exclude from source control?.

这篇关于Visual Studio 中的包目录是什么?我应该将它包含在 SVN 中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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