Solved

debugging dll files in a .NET project

Posted on 2010-11-25
5
465 Views
Last Modified: 2012-06-22
I have a .NET project which contains a dll which I have created myself. Now, there is some problem, either in my calling code, or in the dll, but I can't figure out what it is because I can't debug the dll for some reason.

Now, I don't know why, but I have added that dll to other projects, and when an error occurs, the debugger opens up the dll and automatically debugs it. In this project, however, for some reason it just says 'there is no source code for this location' or something to that effect and the dll can't be opened or debugged (or at least, I'm not sure how to do it if it doesn't happen automatically). If I alter something in the dll outside of the project, the project that can debug the dll even tells you something has changed and asks if you want to load the changes into the dll that is part of the project.

What's the difference between the two projects?
0
Comment
Question by:AidenA
  • 2
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 34212189
Are you referencing just the DLL, or have you added teh class library project to your solution and added a project reference?
0
 

Author Comment

by:AidenA
ID: 34212235
well i don't remember if i did it any different way the first time. But usually i just right click on the project and select 'add reference' and the browse to where my dll is and then add it... so i guess i'm just referencing the dll.

or is there a chance i'm doing something else also in the other projects? how can i tell, if that's the case.
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 34212267
Check the path to the DLL you are referencing, making sure that it is the copy from the Debug folder rather than Release.
0
 
LVL 11

Expert Comment

by:SAMIR BHOGAYTA
ID: 34212431
Hello,

You first add the custom control dll project into your opened project as a add existing project. Then put there debug point and debug the software. It is working.
0
 

Author Comment

by:AidenA
ID: 34212491
Yeap thanks Carl... that was it. Didn't think about that. Think I used the release version because the debug version didn't update when I built the project. So, I just tried to run the project and there was an error because you can't run a dll but it still built the debug version anyway and so i replaced with that.

Now i can step through it ok... thanks again

Aiden
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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