Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 387
eKek0 Avatar asked Aug 24 '12 13:08

eKek0


People also ask

What is Visual Studio packages folder?

Packages is where the nuget packages are fetched. No you do not ship to your IIS server. Actually there are a lot of files you don't copy. You should use visual studio to build a deployment folder, and only copy files from the deployment folder. Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM.

Can I delete packages folder Visual Studio?

YES you can delete this directory, if you have uninstalled Visual Studio.

Should packages folder be in Source Control?

Should I check in the Packages folder in the Source Control to make them available for peers? The answer is "NO". You should not checkin packages folders since this will increase the size of the repository and it will become overhead when taking the latest (since the size of the packages folder is in the MBs).

Should you commit NuGet packages?

NuGet now has the ability for you to re-download the missing packages as a pre-build step, meaning that you only need to commit your packages. config file (and include nuget.exe in a tools folder). Read Using NuGet Without Committing Packages to Source Control for more details.


1 Answers

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

like image 200
akton Avatar answered Oct 22 '22 03:10

akton