8

I am developing an N-tier application and want to create each tier separately (i mean not in one solution), so i have the DAL, BLL and Entities DLLs created separately, then i reference them in my presentation layer solution, anyway, for quick maintenance, i thought on creating a solution in which i add the projects DAL, BLL, Entities and the Presentation layer as existing projects, is it ok or it will have concequences ?

Angela
  • 95
  • 1
  • 1
  • 8
  • 5
    Typically I always have all my projects in the same solution and only create other sub-solutions if the main one get too large. – juharr Mar 23 '17 at 13:50
  • 5
    A solution has not much to do with software logic, but more on the software development process, so to separate them in different solutions can be useful if your projects are involved in different development processes. In your case, I think I would prefer to keep it all in a single solution. – Caspar Kleijne Mar 23 '17 at 13:50
  • Thank you both :) , it seems there was no need to separate them after all ^^" ... But since i have them already separated, i guess i should work only on the last created solution that has all the projects. – Angela Mar 23 '17 at 13:53

1 Answers1

9

Every decision has consequences.

Splitting an application into multiple solutions has some positive and some negative. If you have dozens of projects, multiple solutions is a good way to reduce load and navigation time. However you may spend more time flipping between solutions or instances of Visual Studio.

You can also put the same projects in multiple solutions; solutions do not have to represent a physical folder necessarily. If you "add existing project" you can grab an existing project from another solution and have it in both solutions.

Generally, I avoid this because it can create issues with multiple instances of Visual Studio using the same files, but it can be helpful at times. Usually I only do it for debugging help when working on the boundaries between two related applications in different solutions, or an application and a library it consumes.

JamesFaix
  • 8,050
  • 9
  • 37
  • 73
  • James, I have one project used in two solutions and it’s classes suffer a compiler error “inaccessible due to it’s protection level” in both. How would you handle this problem? – Globe Apr 07 '19 at 10:22
  • Are you using InternalsVisibleToAttribute in AssemblyInfo? – JamesFaix Apr 07 '19 at 14:22
  • I’ve tried it to no effect. Made some screenshots, will send them to you – Globe Apr 07 '19 at 21:38
  • 1
    James, I’v posted a new question with more details and screenshots - look it here https://stackoverflow.com/questions/55568182/c-class-inaccessible-due-to-its-protection-level please – Globe Apr 08 '19 at 07:30