views:

50

answers:

2

I am using Visual Stidio 2010 Beta 2 and just started using MVC, I copied a bunch of dlls into a Bin folder and Included this Bin folder in the project. It seems that there is no reference to these dlls from Controller classes?

Is this an MVC thing, or a broken project/VS installation?

+2  A: 

What do you mean by "included this bin folder in the project", to add a reference, you need right click the project in visual studio, click "Add Reference", then add those dlls into your project. Is this what you are looking for?

J.W.
I would prefer to drop them in the Bin folder and have them auomatically referenced, in order to manage versions, than reference a 3rd folder. This does work in VS 2008?
Mark Redman
OK, I have used "Add Reference" and browsed to the Bin Folder and selected those? I now have reference to those dlls, but this seems wrong? Is this standard practice?
Mark Redman
You manage references by having something like a "libs" folder where you put all your references. Then when you add a reference you do it from that folder. If you update a reference in the "libs" folder and build the project, the new version will be used. This is usually the easiest way to handle references in a website as well. Because its better for source control tools (like svn or git). This has always been the behavior in a web application.
Mattias Jakobsson
@Mattias Jakobsson: Thanks, it looks like we will need to take this route. Should we add this Library folder into the App_Data folder so xml and other files remain non-accessible or deleted before deployment etc? Or should this not be part of the application repository?
Mark Redman
I usually put it outside of my project structure. I have it set up something like this: /[projectname] (solution file)/[projectname]/libs (all my dependencies)/[projectname]/[projectname].Web (the web application structure)And then one folder for each project I have (like a core class library that is in the same solution as my web project).
Mattias Jakobsson
Thats great, thanks very much for your asnwers..
Mark Redman
just for info! what if we are to code / build / work on a project from commandline(have no access to IDE), how to reference dll then ? any idea ?
Asad Butt
+1  A: 

edit - J.W. answered as I was typing. :)

Instead of dropping them in the bin folder, try right clicking on "References" and adding them using the Browse... tab.

mark123