DebugVisualizers and Generic EntityCollection

Posts   
 
    
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 18-Jun-2008 10:49:18   

I'm using v2.6 (2.6.08.0613). I've enabled fast serialization and I've a generic EntityCollection, and when I click the visualizer icon in VS2008, it throw the following exception.


See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Serialization.SerializationException: Member 'AmountEntitiesInList' was not found.
   at System.Runtime.Serialization.SerializationInfo.GetElement(String name, Type& foundType)
   at System.Runtime.Serialization.SerializationInfo.GetInt32(String name)
   at SD.LLBLGen.Pro.ORMSupportClasses.CollectionCore`1..ctor(SerializationInfo info, StreamingContext context)
   at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase2`1..ctor(SerializationInfo info, StreamingContext context)

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 18-Jun-2008 12:11:50   

Would you please make sure you don't have outdated debugger visualizer dll and / or ORMSupportClasses dll in your vs.net folder?

Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 18-Jun-2008 15:06:56   

the version of file LLBLGen Pro v2.6\RuntimeLibraries\DotNET20\DebugVisualizers\VS.NET 2008\SD.LLBLGen.Pro.DebugVisualizers.dll is v2.5.07.0110 not v2.6? is it the most updated version?!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 18-Jun-2008 15:44:17   

Barry, you're absolutely right.

(edit). It seems the version value on the dll is wrong, but the file should have the file version 2.6.07.0110.

That's still wrong of course, we'll correct that.

The ORMSupportClasses file in the debugger visualizers folder in your windows profile should be the latest v2.6 one as well. So you should check if the two files (debugger visualizers dll and ormsupportclasses dll) in the debugger visualizers folder in your windows profile (inside the vs.net folder) are the latest ones.

Frans Bouma | Lead developer LLBLGen Pro
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 23-Jun-2008 15:16:00   

I've verified all the in windows profile "C:\Users\XYZ\Documents\Visual Studio 2008\Visualizers" are exactly the same as the files in LLLBGen installation folder and all are the latest version, and my application is using the same version too, but it is still failed to work.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 23-Jun-2008 18:57:11   

Barry wrote:

I've verified all the in windows profile "C:\Users\XYZ\Documents\Visual Studio 2008\Visualizers" are exactly the same as the files in LLLBGen installation folder and all are the latest version, and my application is using the same version too, but it is still failed to work.

Will look into it. (on our devsystems, they work, but I'll try with a clean slate). You've enabled fast serialization? (as the data is serialized by vs.net)

Frans Bouma | Lead developer LLBLGen Pro
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 24-Jun-2008 05:01:33   

Yes, I've enabled fast serialization.

If I disable fast serialization, and it does not have any response when I click on visualizer icon, no error and no dialog. confused

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 24-Jun-2008 10:34:57   

Barry wrote:

Yes, I've enabled fast serialization.

If I disable fast serialization, and it does not have any response when I click on visualizer icon, no error and no dialog. confused

Hmm...

Well, here VS.NET sometimes indeed refuses to show a visualizer as well (e.g. the expression visualizer for expression trees they ship in the examples), not sure what the cause is. I'll check with fast serialization enabled and report back.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 24-Jun-2008 10:52:19   

I can't reproduce it...

First closed all vs.net instances, then I've removed the visualizers from the vs.net 2008 visualizers folder in my documents, then I've copied the 2008 version of the debuggervisualizers dll and the ormsupportclasses .net 2.0 dll into the vs.net 2008 folder, created a new project (adapter) and a console app, referenced the same builds of the ormsupportclasses, created a simple routine:

SerializationHelper.Optimization = SerializationOptimization.Fast;
EntityCollection<OrderEntity> orders = new EntityCollection<OrderEntity>();
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
    adapter.FetchEntityCollection(orders, null);
}
Console.WriteLine(orders.Count);

breakpoint on the console writeline line and I'm able to visualize all 818 order entities just fine. With or without fast serialization.

What collection are you exactly trying to visualize? I.e. a collection inside an entity or a nongeneric collection ?

Frans Bouma | Lead developer LLBLGen Pro
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 03-Jul-2008 12:09:54   

I found some llblgen dlls (SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll and SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll) are installed in c:\windows\assembly, both version 2.0, 2.5 and 2.6 are found, and I removed all of them, the DebugVisualizers finally work fine as before now.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 03-Jul-2008 13:14:18   

Barry wrote:

I found some llblgen dlls (SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll and SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll) are installed in c:\windows\assembly, both version 2.0, 2.5 and 2.6 are found, and I removed all of them, the DebugVisualizers finally work fine as before now.

ah! That's indeed the issue: .NET 2.0+ loads an assembly always first from the GAC, even if it's located right in the same folder as the using assembly. Rule of thumb: don't install our runtimes in the GAC unless you absolutely have to.

Frans Bouma | Lead developer LLBLGen Pro