Solved

Circular dependency with DAL and BLL.

Posted on 2009-05-06
3
711 Views
Last Modified: 2012-06-27
I am getting errors in the BLL and DAL since they both depend on each other.
Error      3      The type or namespace name 'BLL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.DAL\DAL\Tickets\TicketData.cs      9      25      KORE.SIDWebClient.DAL
Error      4      The type or namespace name 'Ticket' could not be found (are you missing a using directive or an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.DAL\DAL\Tickets\TicketData.cs      38      54      KORE.SIDWebClient.DAL
Error      5      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Company\Company.cs      4      25      KORE.SIDWebClient.BLL
Error      6      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Tickets\TicketLogic.cs      5      25      KORE.SIDWebClient.BLL
Error      7      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketPriority.cs      6      25      KORE.SIDWebClient.BLL
Error      8      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketAssignedTo.cs      6      25      KORE.SIDWebClient.BLL
Error      9      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupPriorityLevel.cs      6      25      KORE.SIDWebClient.BLL
Error      10      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketContactMethod.cs      6      25      KORE.SIDWebClient.BLL
Error      11      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketRequestType.cs      6      25      KORE.SIDWebClient.BLL
Error      12      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketServiceImpact.cs      6      25      KORE.SIDWebClient.BLL
Error      13      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupTypeTicket.cs      6      25      KORE.SIDWebClient.BLL
Error      14      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketStatus.cs      6      25      KORE.SIDWebClient.BLL
Error      15      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketAgentFollowup.cs      6      25      KORE.SIDWebClient.BLL
Error      16      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketLocationSIMs.cs      6      25      KORE.SIDWebClient.BLL

What do I do?
0
Comment
Question by:mathieu_cupryk
  • 2
3 Comments
 
LVL 6

Expert Comment

by:ViceroyFizzlebottom
Comment Utility
The easy answer would be to refactor your code to comply with the Isolation of Concerns principle; more specifically to remove any BLL dependencies from your DAL.

In any event though, make sure your references are still good in both projects by ensuring there are no exclamation point icons when you expand your References folder. If the references don't exist (or they are broken as indicated by the exclamation point.)

Another quick way to check is to add a 'using' statement at the top of each .cs file and see if your namespace(s) show up in the context dialog.
0
 
LVL 6

Accepted Solution

by:
ViceroyFizzlebottom earned 500 total points
Comment Utility
Whoops, the second paragraph should have continued...

then you should be able to simply re-add the references.
0
 

Author Comment

by:mathieu_cupryk
Comment Utility
I am still not convince what happens if we make a common layer instead of have two assemblies.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now