473,320 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Stepping Through Code in a DLL

I'm developing a C# WinForms app. My main EXE is referencing a DLL that I
call "DataObjects.dll".

I'm trying to step through each line of code to track down a bug. When a
call is made to a method in the DLL, the code executes but it does not let me
step through the code in the method.

I KNOW it used to let me do this!

So I cleared out all the files from the bin and obj folders of both the DLL
and the EXE. Yet this didn't resolve the problem.

Why did this happen and how do I fix it?

--
Robert W.
Vancouver, BC
www.mwtech.com

May 30 '06 #1
7 1493
Robert W. wrote:
When a call is made to a method in the DLL, the
code executes but it does not let me step through
the code in the method.


You did build the solution in Debug and not Release mode, right?

Eq.
May 30 '06 #2
Yes, it's built in Debug mode. And I've Rebuilt it several times. But
still, when I try step through it, it won't let me step through the code in
the DLL's method.

Has this not happened to anyone else before?

--
Robert W.
Vancouver, BC
www.mwtech.com

"Paul E Collins" wrote:
Robert W. wrote:
When a call is made to a method in the DLL, the
code executes but it does not let me step through
the code in the method.


You did build the solution in Debug and not Release mode, right?

Eq.

May 30 '06 #3
Your "Main EXE" project needs to have a PROJECT REFERENCE to the project that
builds the Assembly (DLL), not a direct reference to the build assembly dll.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Robert W." wrote:
I'm developing a C# WinForms app. My main EXE is referencing a DLL that I
call "DataObjects.dll".

I'm trying to step through each line of code to track down a bug. When a
call is made to a method in the DLL, the code executes but it does not let me
step through the code in the method.

I KNOW it used to let me do this!

So I cleared out all the files from the bin and obj folders of both the DLL
and the EXE. Yet this didn't resolve the problem.

Why did this happen and how do I fix it?

--
Robert W.
Vancouver, BC
www.mwtech.com

May 30 '06 #4
Robert,

Are you referencing a project, or are you referencing the DLL? You need
to reference the project, and not the dll itself in order to be able to step
through.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Robert W." <Ro*****@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com...
Yes, it's built in Debug mode. And I've Rebuilt it several times. But
still, when I try step through it, it won't let me step through the code
in
the DLL's method.

Has this not happened to anyone else before?

--
Robert W.
Vancouver, BC
www.mwtech.com

"Paul E Collins" wrote:
Robert W. wrote:
> When a call is made to a method in the DLL, the
> code executes but it does not let me step through
> the code in the method.


You did build the solution in Debug and not Release mode, right?

Eq.

May 30 '06 #5
Dear Peter,

I thought I had done that (as you described) but just to be sure, I removed
all references and re-established them as per your instructions. This
corrected the problem! Strange that it didn't work before.

While we're on the topic of references, maybe you could help me with a
nagging reference error that I've had for some time. It's shown in the
warning message here:

Warning: The dependency 'DataObjects, Version=1.0.2340.19611,
Culture=neutral' in project 'Desktop' cannot be copied to the run directory
because it would overwrite the reference 'DataObjects,
Version=1.0.2341.26251, Culture=neutral'.

I understand that it won't overwrite a newer version but the fact is that
DataObjects is being rebuilt whenever I rebuild Desktop, so why is this
happening?
--
Robert W.
Vancouver, BC
www.mwtech.com

"Peter Bromberg [C# MVP]" wrote:
Your "Main EXE" project needs to have a PROJECT REFERENCE to the project that
builds the Assembly (DLL), not a direct reference to the build assembly dll.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Robert W." wrote:
I'm developing a C# WinForms app. My main EXE is referencing a DLL that I
call "DataObjects.dll".

I'm trying to step through each line of code to track down a bug. When a
call is made to a method in the DLL, the code executes but it does not let me
step through the code in the method.

I KNOW it used to let me do this!

So I cleared out all the files from the bin and obj folders of both the DLL
and the EXE. Yet this didn't resolve the problem.

Why did this happen and how do I fix it?

--
Robert W.
Vancouver, BC
www.mwtech.com

May 30 '06 #6
Robert,
this is very common, because the default settings for build numbering in the
AssemblyInfo.cs file is 1.0.*.*.
Change this to a hard-coded number such as 1.0.0.0 and now you control it.
Delete the Assembly DLL that refuses to be overwritten and after you've done
that, the problem will go away.

-- Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Robert W." wrote:
Dear Peter,

I thought I had done that (as you described) but just to be sure, I removed
all references and re-established them as per your instructions. This
corrected the problem! Strange that it didn't work before.

While we're on the topic of references, maybe you could help me with a
nagging reference error that I've had for some time. It's shown in the
warning message here:

Warning: The dependency 'DataObjects, Version=1.0.2340.19611,
Culture=neutral' in project 'Desktop' cannot be copied to the run directory
because it would overwrite the reference 'DataObjects,
Version=1.0.2341.26251, Culture=neutral'.

I understand that it won't overwrite a newer version but the fact is that
DataObjects is being rebuilt whenever I rebuild Desktop, so why is this
happening?
--
Robert W.
Vancouver, BC
www.mwtech.com

"Peter Bromberg [C# MVP]" wrote:
Your "Main EXE" project needs to have a PROJECT REFERENCE to the project that
builds the Assembly (DLL), not a direct reference to the build assembly dll.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Robert W." wrote:
I'm developing a C# WinForms app. My main EXE is referencing a DLL that I
call "DataObjects.dll".

I'm trying to step through each line of code to track down a bug. When a
call is made to a method in the DLL, the code executes but it does not let me
step through the code in the method.

I KNOW it used to let me do this!

So I cleared out all the files from the bin and obj folders of both the DLL
and the EXE. Yet this didn't resolve the problem.

Why did this happen and how do I fix it?

--
Robert W.
Vancouver, BC
www.mwtech.com

May 30 '06 #7
Peter,

I'm aware of how the last part of the version number is created - a
mathematical expression of date & time. And based on that, I don't
understand why the numbers don't keep on increasing.

Another Microsoft mystery?

--
Robert W.
Vancouver, BC
www.mwtech.com

"Peter Bromberg [C# MVP]" wrote:
Robert,
this is very common, because the default settings for build numbering in the
AssemblyInfo.cs file is 1.0.*.*.
Change this to a hard-coded number such as 1.0.0.0 and now you control it.
Delete the Assembly DLL that refuses to be overwritten and after you've done
that, the problem will go away.

-- Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Robert W." wrote:
Dear Peter,

I thought I had done that (as you described) but just to be sure, I removed
all references and re-established them as per your instructions. This
corrected the problem! Strange that it didn't work before.

While we're on the topic of references, maybe you could help me with a
nagging reference error that I've had for some time. It's shown in the
warning message here:

Warning: The dependency 'DataObjects, Version=1.0.2340.19611,
Culture=neutral' in project 'Desktop' cannot be copied to the run directory
because it would overwrite the reference 'DataObjects,
Version=1.0.2341.26251, Culture=neutral'.

I understand that it won't overwrite a newer version but the fact is that
DataObjects is being rebuilt whenever I rebuild Desktop, so why is this
happening?
--
Robert W.
Vancouver, BC
www.mwtech.com

"Peter Bromberg [C# MVP]" wrote:
Your "Main EXE" project needs to have a PROJECT REFERENCE to the project that
builds the Assembly (DLL), not a direct reference to the build assembly dll.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Robert W." wrote:

> I'm developing a C# WinForms app. My main EXE is referencing a DLL that I
> call "DataObjects.dll".
>
> I'm trying to step through each line of code to track down a bug. When a
> call is made to a method in the DLL, the code executes but it does not let me
> step through the code in the method.
>
> I KNOW it used to let me do this!
>
> So I cleared out all the files from the bin and obj folders of both the DLL
> and the EXE. Yet this didn't resolve the problem.
>
> Why did this happen and how do I fix it?
>
> --
> Robert W.
> Vancouver, BC
> www.mwtech.com
>

May 30 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: c# newbie | last post by:
When stepping through code, to find where an error is thrown, the problem is that I have to step threw the statement that causes the error, and if it's in a class that's instantiated from the main...
2
by: John Black | last post by:
Hi, I wonder if there is any good way in debugging the code not steping into STL code, it is easy to do in normal statement, just click "step over", but when there are some STL type variable on...
5
by: pinaki_m77 | last post by:
Hi, I am trying to debug a C++ program using Microsoft VC++ IDE. The program loads a dynamic link library (dll) and later makes calls to functions inside this dll. I want to step inside the code of...
0
by: craig | last post by:
When stepping though C# code in Visual Studio, often times a line of code will cause an event handler to be run. However, it appears that the debugger will not automatically step into that event...
25
by: David C | last post by:
I posted this question, and from the replies, I get the impression that I worded my posting very poorly, so let me try this again. While debugging and stepping through this foreach loop ...
0
by: stand__sure | last post by:
Stepping into a stored procedure used to be fairly straight-forward, but after following the guidance in all 6 or so of the MSDN pages about enabling debugging of stored procedures in SQL Server...
5
by: scl | last post by:
I have an application with a .Net front end that makes calls into a series of VB6 dll's via COm InterOpt. Although everything works quite well, the main issue that I have is regarding the overall...
0
by: =?Utf-8?B?TWlrZSBPS0M=?= | last post by:
VB 2003 As I am stepping through code, I want to see a data table in a grid, so I can easily see the data in the data table. Currently I QuickWatch the data table, then I have to add ".rows(0)"...
7
by: Lyn | last post by:
Is there a solution to this problem? While stepping through code (F8) it would sometimes be helpful to observe changes occurring on the affected form in the Access window. However, the current...
15
by: postman | last post by:
Any idea why code would work as intended when setting a breakpoint and stepping through it line by line, but won't work correctly at run-time? The code is too much to post, so I hope this summary...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.