Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

VS 2010 and Expression Tree Visualization

Alexandra Rusina explains on her blog the new VS 2010 Expression Tree visualization capabilities at debug time. Basically, a new meta language is used to make expression tree complex hierarchy more concrete. As far as I understand, this meta language is based on some new .NET v4 framework feature. As a consequence, when debugging a .NET 3.5 assembly in VS 2010, you don’t have access to this new meta language visualization feature.

Moreover while this meta language can express things more concisely, I guess they’ll be a range of scenarios where I’ll prefer to keep using C# 2008 Samples Expression Tree Visualizer (Expression Tree visualization through a Windows Form Tree) or Manuel Abadia Linq Expression Debugger Visualizer (Expression tree visualization through a graph). I noticed that both these addin doesn’t work as-is on VS 2010 and the trick I wanted to share here is that, to use them under VS 2010, you just need to recompile them by referencing the VS 2010 assembly Microsoft.VisualStudio.DebuggerVisualizers.dll (found in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.VisualStudio.DebuggerVisualizers.dll) instead of the VS 2008 assembly with the same name. This works like a charm with the C# 2008 Samples Expression Tree Visualize used in VS 2010 on .NET 4 and .NET 3.5 projects. I expect the same good result with the Manuel Abadia piece of code (but source code is not available here so I couldn’t recompile, Manuel can you do that?).

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Jon Smith

    Hi Patrick,

    I am writing some complictaed UDFs callable by LINQ SQL and I wanted to see what the final SQL was like so I followed the various threads to try and get ScottGu’s visualizer going on VS2010. I have changed it to use the newer DebuggerVisualizers.dll but it still doesn’t work. I now get the error:

    The fuction evaluation requires all threads to run

    Any thoughts?

    Jon Smith
    Selective Analytics