.NET Debugging Issue

B

Barbara Alderton

VS2003
vb.net 1.1.

I'm working on a fairly substantial web app. When going into the debugger,
I get "Run-time exception thrown : System.ArgumentException - Cannot find
the method on the object instance" on properties that I should be able to
see. If I make a property (that's a string) equal to a local string
variable, I can see the value then. (same goes for integer, long, etc). I
get this for datatables, datarows, etc..

An example would be the datatable.rows.count (I could not see and get the
run time error), but if I:

dim intCnt as int32
intCnt = datatable.rows.count

I can see the value of intCnt; I can't see the value of datatable.rows.count
and get the error.

Any ideas?
 
S

sirfunusa

When developing, do you see these properties via Intellisense? Is the
object a valid object (not Nothing) at runtime?
 
O

Oisin

Hi Barbara,


I've seen this happen when debugging an app on a local or remote
machine, and the application is loading an older version of (the)
assembly(ies) from the GAC, instead of the local bin folder where
visual studio is placing them. The older assembly doesn't have a
recently added method that visual studio is trying to single step
through, or sees in the local PDB database.

hope this helps,

- Oisin
 
S

Steven Cheng[MSFT]

Hi Barbara,

Thank you for posting.

From your description, when debugging an ASP.NET 1.X application in VS
2003, you're encountering "Run-time exception thrown :
System.ArgumentException - Cannot findthe method on the object instance"
error in the watch window (if you try viewing some complex object's sub
prorperteis or nested properties) ,correct?

Based on my local test, I can correctly view such complex type's sub
properties. So is this a project specific issue on your development
machine. Have you tried visiting other objects of other complex type in the
problem project in other project to see whether it works.

Also, is this project oringally developed under .net 1.1 or an 1.0 project?
I just found some public thread dicussing on the similiar problem when
debugging an ASP.NET 1.0 project in vs 2003/.net 1.1.

Please let me know if there's anything I missed or anything else you found.


Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,217
Latest member
topweb3twitterchannels

Latest Threads

Top