Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What ASP.NET MVC project files should be kept in a repository?

background:Me and my coworkers are working on asp.net mvc project ... we have a computer that works as a server which is where the project will be stored on... each of us has a copy of the project and we got tortoise cvs set up.

questions: when you want to commit something, what files exactly do you commit?.. asp.net reports many dll files, csproj files, cs and sln files that appear to be different from the server's.

Maybe my question is not the right one I should ask so I would appreciate some insight on whats the best approach for working in groups.

like image 594
nacho10f Avatar asked Sep 04 '09 14:09

nacho10f


People also ask

What is the use of repository in ASP NET MVC?

The repository is used to create an abstraction layer between the data access layer and the business logic layer of an application. Implementation of repository patterns can help to abstract your application from changes in the data store and can facilitate automated unit testing.

Which MVC folder of ASP Net is used for storing application data?

By default, MVC projects include the following folders: App_Data, which is the physical store for data. This folder has the same role as it does in ASP.NET Web sites that use Web Forms pages. Content, which is the recommended location to add content files such as cascading style sheet files, images, and so on.

Where is data stored in MVC?

If you're asking whether it is stored on the stack or on the heap, the response is: on the heap. Instance variables for a reference type are always on the heap.


2 Answers

The basic csproj file should be committed whenever you add or remove things from the project, to ensure that the project has all the correct files. The solution (sln) is a good one to commit, for the same reason, although I've also seen it done without. You'd also want to commit any cs files, naturally, as they're the main focus of things.

DLL files should only be committed if they're outside references--internal dlls to your project can be ignored, as they'll be built by each computer in turn. You also want to avoid .user files as unnecessary. Ignore the 'bin' and 'obj' folders for each directory, when it comes to commits as well.

like image 79
Brisbe Avatar answered Sep 19 '22 22:09

Brisbe


You really shouldn't check in anything that the project can generate itself. So no need to check in your bin or obj folders or anything like that, you also want to ignore any user preferences files.

This includes dlls, unless they are third party dlls, then you want to check them in to ensure everyone is working against the same version and this way you don't have to keep changing reference paths.

like image 27
Brandon Avatar answered Sep 17 '22 22:09

Brandon