Reputation: 27225
I've seen discussed the MVC project structure using a UI Project and a Code Project. e.g.
http://lostechies.com/jimmybogard/2009/12/09/organizing-asp-net-mvc-solutions/ http://stackoverflow.com/questions/4357911/an-ideal-folder-structure-for-net-mvc
I've tried to do this in Visual Web Developer 2010 Express but I still end up having the following non-website related files in the UI project: .csproj, .csproj.user, the project dll file and the project pdb file.
This defeats the purpose, as the point of splitting into two projects was to have the UI one clean enough to run directly as the website without having to filter out un-necessary files.
Have I done this wrong? Or is this a limitation of this approach?
Any additional detail which might help me get this configuration working would be appreciated.
Upvotes: 1
Views: 1237
Reputation: 47375
The reason for separating a project into separate core + UI projects is to cleanly separate the source code concerns.
Two of the files you are mentioning, the CSPROJ and CSPROJ.USER files, are for VWD only. They are not source code, and are not deployed when you publish your project.
The other 2 files, core DLL and core PDB, are runtime assemblies and debug files respectively. Your UI project will need a reference to these in order to be able to run code written and compiled into the core project.
So, having Core.dll and Cord.pdb in the bin folder of your UI project is okay, and doesn't violate SoC. The csproj files have nothing to do with code, they are only there so that VWD can manage the projects.
Upvotes: 2