Solved

debugging dll files in a .NET project

Posted on 2010-11-25
5
476 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

789 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