Solved

debugging dll files in a .NET project

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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