Problems with CSLA objects and Watch Window

Problems with CSLA objects and Watch Window

Old forum URL: forums.lhotka.net/forums/t/6764.aspx


cmay posted on Wednesday, April 08, 2009

An issue I have always had with CSLA was that things CSLA objects don't seem to play nice with the Watch window when debugging.

I tried searching here, but didn't find anything.

So for example I have a simple list called "projects" which is of type ProjectList contining ProjectListItems.

If I put "projects" in the watch window, for Value I get:

"Count = {System.TypeLoadException}"

If I put "projects(0)" in the watch window, I get:

{"The generic type 'System.Collections.ObjectModel.Collection`1' was used with the wrong number of generic arguments in assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.":"System.Collections.ObjectModel.Collection`1"}

Is this a known issue, or am I doing something wrong?

RockfordLhotka replied on Wednesday, April 08, 2009

This is a known issue. I've actually talked to the VS debugger team about this, and they didn't have a satisfactory answer - and certainly not a solution. This issue has existed since 2005 when generics were introduced into .NET.

cmay replied on Wednesday, April 08, 2009

Ok thanks.

Copyright (c) Marimer LLC