Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

debugging dll files in a .NET project

Posted on 2010-11-25
5
Medium Priority
?
491 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 2000 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

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…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

916 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