What is the packages directory in Visual Studio? Should I include it in SVN?

眉间皱痕 提交于 2021-02-06 06:32:38

问题


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.*

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?


回答1:


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.

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.

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?.



来源:https://stackoverflow.com/questions/12110471/what-is-the-packages-directory-in-visual-studio-should-i-include-it-in-svn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!