Karnivaurus
Karnivaurus

Reputation: 24121

ASP.NET MVC 5 - References vs bin folders?

I am trying to set up an ASP.NET MVC 5 project in Visual Studio 2013, based on another project I have been given by somebody significantly more experienced than me. In his project, there is a References folder, with references to System, System.Core etc., together with third-party libraries. However, this folder does not exist by default in my new ASP.NET MVC 5 project. Instead, I have a folder called bin, which looks similar to References, and I can add references to dlls. What is the difference between the References and bin folders? Why does his project have one, and mine has the other? Thanks.

Upvotes: 1

Views: 2562

Answers (2)

IramG
IramG

Reputation: 1

In Visual Studio 2015:

File >> New >> Project (Web Application)

A Project will have a References node when viewed through Solution Explorer in the IDE. If viewed with a file explorer (Windows Explorer) there is no Reference folder. References are stored in the project (csproj or vbproj) file using plain xml/text.

File >> New >> Web Site

A Web site does not have the References node nor a project file. In Solution Explorer right-click on the Bin folder or the root node to add References. References can be seen in the Property Pages (right-click root node).

Upvotes: 0

sarin
sarin

Reputation: 5307

Your references 'folder' are assemblies (DLLs) that are referenced by your project. The reference is held in text in the project file.

The bin folder is used for compilation of your project. At compile time, the references in the project file are resolved (located for use by your project when it's running). This may be copying them from another location on disk, downloading a nuget package or using a version from the GAC. If the assembly is going to be copied down from another location it will be copied into the bin folder where all the files necessary for the application to run are stored.

UPDATE:

A different project type had been added and hence the references folder was not visible. Adding an ASP.NET Web Project into the solution solved this.

Upvotes: 3

Related Questions