Solved

Circular dependency with DAL and BLL.

Posted on 2009-05-06
3
718 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
ID: 24319425
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
ID: 24319446
Whoops, the second paragraph should have continued...

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

Author Comment

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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

12 Experts available now in Live!

Get 1:1 Help Now