Solved

Modifying and Debugging BLL/DAL

Posted on 2010-09-22
10
678 Views
Last Modified: 2013-12-12
I am trying to find a logic error in an existing project and have eliminated all possibilities in the project itself. I need to be able to debug and modify the BLL in order to find and fix the problem.

Having never worked with these before, I am completely in the dark on how to pull them onto my test server and attach them to the version of the project I've been modifying.

I've found lots of information on how to create new ones, but I don't see how to pull the source code out, modify it, recompile and attach it to the test project. Much LESS how to debug it! :)

Appreciate your help!
0
Comment
Question by:FIM2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
10 Comments
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 33737083
If you want to debug into the source code in BLL/DAL dll, add reference to the dll of that project (BLL & DAL) directly from the location inside its source code folder. Whenever you make a change in BLL or DAL just right-click the reference DLL and select 'Update Reference'. this will update the dll from the source code folder that project.

You can also debug into the source code of BLL/DAL, if you do in this manner. I worked in this way in my first project.

Raj
0
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 33737092
Another way is to add three project into one solution file.
1. GUI
2. BLL
3. DAL
Add reference in the way I suggested above. This will be more easier, so that you have to open only one solution to view all the three projects

Hope it is clear
Raj
0
 

Author Comment

by:FIM2003
ID: 33738328
So for either of these ideas, do I have to recompile? I've never worked with DLL's and haven't a clue. The source code I have is NOT the actual BLL/DAL files, but the actual c# that is running. I thought there was a compilation step that turned them into the references.

Also, the location of them would change with that. Update references fixes that?
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 9

Expert Comment

by:jhshukla
ID: 33739354
Usually, you will find symbol files (.pdb) with the dlls and exes. Visual studio should find them automatically but there are ways to give it hints. You will need the pdbs if BLL & DAL are in separate solutions.

What I usually do is put a break point in the exe source where it is calling into BLL. When the debugger hits the breakpoint, step into the method. it should automatically open the BLL source file.

And you should not need to recompile.
0
 

Author Comment

by:FIM2003
ID: 33745590
Maybe I'm not being clear. I have NO experience with this at ALL.

I don't see HOW to point it to an edited version of the BLL/DAL Right now, it points to the production version and without recreating from scratch, I don't see how to make it choose one where I have made changes to the source code. I just have the source code so I can look at what it is doing, but it is just that - C# source code. No pdb or anything. So from my main project, how would I do that? Update Reference would just update the production version which hasn't changed (and CAN'T yet).

0
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 33745757
>> So for either of these ideas, do I have to recompile?

In case of 1st suggestion - http:#33737083
If there is any change in BLL or DAL project, you need to first open that project in Visual Studio and compile it. This will update the DLL related to that project after compilation. After this in your main project (GUI) you have to right-click the DLL of BLL / DAL and Click 'Update Reference'. This will update the DLL of BLL / DAL with the latest version of DLL from the location you added reference to this project.

In case of 2nd suggestion - http:#33737092
Since these three projects are in a single solution, NO need to compile BLL / DAL separately. It will automatically recompile the DLL of them, if there is any change to source code.

0
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 33745778
>> The source code I have is NOT the actual BLL/DAL files, but the actual c# that is running

I am not clear! Do you mean that you have the source code, not DLL files ?
0
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 33745793
>>  I thought there was a compilation step that turned them into the references.

As per my knowledge there is NO compilation step to turn the BLL/DAL project's DLL into reference.
0
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 250 total points
ID: 33745882
Re: http:#33745590

By your comment, I understood like this. - You want to point to the development version of BLL/DAL DLLs in your development project. Currently it is pointing to the production version of BLL/DAL DLLs.

If you want to point to some other version of DLL, you need to first remove those DLLs from you main project (remove reference) and again add reference to the version of DLL you want to point now.
0
 

Author Closing Comment

by:FIM2003
ID: 33789941
Thanks! I FINALLY got it to point there! Removing it first helped - I kept trying to just CHANGE the direction. Now cross your fingers I can get it working!!!
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
This video shows how use content aware, what it’s used for, and when to use it over other tools.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

710 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