Linq to Entity query visualizer

Free

View Native SQL (MS SQL, DB2, Oracle, etc) of LInQ to entities ObjectQuery while debugging in Visual Studio 2008/2010/. Also view Lambda expression, edit Query parameters, view DB Connection info, view query results, and export results to MS Excel(No MS Excel required)

RRV
(17) Review
Visual Studio
2012, 2010, 2008
Get now (47,467)
9/30/2013
3.3.0.0
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (17)
Q and A (12)
Sign in to write a review
Sort by:

by jeff.mounce | September 11 2012

Nope, doesn't seem to work for me either.
Tried all the suggestions.

Oh well.

RRV September 30 2013
| Edit |
Delete

Hi,

Please try the VS2012 version (v3.3.0.0). It works for VS2010 also if you have any version (including express) of 2012 installed. Specifically the MTA/STA thread issue in VS2010 version which hangs the IDE is fixed in this version.

Kindly share the steps you followed to get it working along with your environment details to info@rajavenkatesh.com

Thanks
Venkat

by BlueOceanCoder | February 09 2012

I was having allot of problems getting the plugin to work even after following all the instructions.


The trick was to add the following web.config tag under system.web

<trust level="Full" originUrl="" />


Hopefully that helps someone, I just spent 5 hours figuring it out :-)

RRV March 07 2012
| Edit |
Delete

Thanks BlueOceanCoder.

Regards
RRV

by Shimmy Weitzhandler | January 17 2012

by Toddler | January 03 2012

i would rate this higher, but unfortunately, i am having a few issues. unless i am overlooking something obvious, the results are not part of the wpf version 3.2.0.2. after successfully connecting (according to the log) and executing the query (also according to the log), the status still shows executing and no results are ever presented. when closing the visualizer, visual studio crashes.

on the positive side, i like how you grab the parameter info and format the sql. having the connection credentials local is also handy.

i certainly think the tool is in the right direction, but needs a little polish. thanks for your efforts.

RRV January 04 2012
| Edit |
Delete

Please let me know if you found any entry in eventvwr during Visual Studio crash.

by chuck02323 | December 13 2011

Doesn't work. Hover over the query, locks up vs10sp1 win7.

RRV January 03 2012
| Edit |
Delete

Hi, Sorry for the inconvenience caused.
Please use the single thread version 3.2.0.2 available at http://www.rajavenkatesh.com/Projects.aspx
You can find the link under LInQ Visualizer-2010\Description

1. Having EDMX support natively for multiple databases like MS SQL, SQL CE, Oracle(28-Dec-2011), DB2, etc i've tested the tool to generate correct native SQL including parameters during your debug session.
2. Option to test the generated SQL using various providers/namespaces for performance.
3. Option to alter SQL parameters/values.
4. Use native datatypes for SQL parameters.
5. Option to export result of SQL to MS Excel even if you dont have MS Excel installed.

Kindly rate this tool after testing. Please support by clicking sponsors to keep us alive.

Thanks
RRV

by G_21 | November 08 2011

It did not work at all. The magnifying glass did not show up in the debugger.

I have Visual Studio 2010 service pack 1 running on Windows 7 64 bit. The folder paths in the install instructions also do not match perfectly, but I think I found the corresponding folders.

RRV January 03 2012
| Edit |
Delete

Please use 3.2.0.2 version. (location as said above)
1. Compiled against (Any CPU).
2. If you find it difficult to find the magnifying glass, add the query result variable to Watch Window and in watch window right hand corner you'll be able to see the magnifying glass.
3. Magnifying glass will appear only with an Object query result. Not if you had casted the query to a different data type.

Kindly rate this tool after testing.

Thanks
RRV

by Canyon Country | October 29 2011

Sounds like a nice utility if I could get it to work. As others found, version 3.2.0.1 locks up VS 2010 Professional running on Win 7 Ultimate x64. I tried to download the non-WPF version, but that link is broken.

RRV January 03 2012
| Edit |
Delete

Hi,
1. The non WPF version link is corrected.
2. A new link for those who get VS2010 hanging is released(3.2.0.2)

Thanks
RRV

by HFamilyKid | September 30 2011

Hi again,

I would really appreciate your help to get your supposedly fab tool working - many thanks.

Ive got the file in both:
My Documents\Visual Studio 2010\Visualizers

&

C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers

I'm using AnySourceEntityQueryVisualizerWPF.dll v3.2.0.1 in both the installed paths as mentioned, there are no other files of yours in use. I dont get any 'unblock' right click option (Ive never ever seen or heard of this before?). Which path should this file be installed to - please answer this question first.

I now get the magifying glass icon but system becomes unresponsive when clicked?

I'm running windows XP SP3 and this version of VS2010 as detailed below:

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel

RRV September 30 2011
| Edit |
Delete

Hi, I faced similar problem in WinXP SP3. Later i found in WinXP SP3, a WPF MTA thread does not get started but freezes main thread. Only STA thread works. So i compiled the entire source code in Win7/VS2010-Ultimate. Then it started working without freezing.
I'll have to device a new technique to get it working in WinXP-SP3.
As you mentioned, unblocking... is above WinXP-SP3 (Vista, Win7)
Thanks for your patience. Will let you know once a specific version for WinXP-SP3 is ready.

Raja Venkatesh

by M.Radwan-MVP | July 15 2011

good

by dunagaraj | June 27 2011

It doesn't work for me at all. Whenever i click on magnifier icon, the VS ULTIMATE becomes unresponsive. I am having the very latest machine of i5 processor with 4GB RAM, W7 64-bit.

Any help will be appreciated

RRV September 25 2011
| Edit |
Delete

Current version is compiled using Win7 and unresponsiveness is gone as new MTA thread in WPF works now which did not work when compiled in WinXP.

by DhawalP | May 06 2011

Ok. Unblocking the dll fixed the below issue. But now it shows a popup box saying - 'Specified cast is not valid'.

I'm getting the same error as Shimmy Weitzhandler. I copied the file to the right directory and the file does exist at the path specified in the error message. Any idea how to fix it?

I'm using VS2010 sp1 on Win7 64-bit OS.

Could not load file or assembly 'file:////c:\Users\dpatel\Documents\Visula Studio 2010\Visualizers\AnySourceEntityQueryVisualizerWPF.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515).

by hong6 | March 24 2011

nice! very helpful.

by vkrish28 | February 04 2011

by Cheung Tat Ming | January 28 2011

The Addon is great! However, the WPF Grid's color is not very nice....
And it has a bug, On the section of Query(s) & Parameters, the LINQ statement's parameter cannot edit second times.

by Yogendra Khopkar | October 25 2010

by Bryan H Foster | August 16 2010

This tool is awesome. Highly recommended to all. Thanks to RV for creating it and supporting it. One would expect there to be something like this built in to VS, but there is not. This has exactly what I had hoped for and expected and is very useful for debugging and understanding the SQL that will be generated. Make sure to read all of the Q&A and follow suggestions/directions closely.

by Tical | January 13 2010

Very nice indeed. The only thing I would add is the ability for the visualizer to point out what parameters need to be set and a place for you to set them. As it is now, you have to look through the SQL expression and replace the parameter with the value you want to use.

RRV January 03 2012
| Edit |
Delete

Hi,
Hope you are using the parameter editing with native datatypes. Let me know if you face any issues.

Thanks
RRV

Sign in to start a discussion


  • Linq to Entity debug visualizer
    7 Posts | Last post July 28, 2010
    • RRV
      Hi I'm Raja Venkatesh - author of RV's Linq to Entity visualizer.
      
      For all of you who work with databases and started working with ADO.NET Entity model in visual studio 2008/2010, you will be missing Linq to SQL debug visualizer from our great Scott.
      
      I've tried my best to create a matching visual studio addin.
      
      The interesting part of this addin is that it should be able to connect to almost any database as far as the connection string created by the entity model of yours works.  In case it does not work try my other tool at http://www.rajavenkatesh.com/projects.aspx - Datatool simple to check your connection string.  The tool tip on namespace label below the connect button in datatool will help you.
      
      In Jim Wooley's blog on Sept 11, 2009 you can see his view [http://www.thinqlinq.com/Post.aspx/Title/LINQ-to-Entity-Visualizer].  Unfortunately it appears the result did not appear in his screen shot and has returned an SQL native error.
      
      In your case i recommend you to create your own working edmx file inside your project to any database of your like MS SQL, Oracle, DB2, etc and visualize a Linq query.
      
      Good luck.
      RV
    • Hi Raja,
      
      For some reason the visualizer of Scott wasn't working. Your's did!
      I'm going to test it for a few days, and them give you some feedback.
      
      Thanks alot!
    • RRV
      Thanks Vermeulen,
      Please rate the tool if you liked.  If you have time please test the datatool-simple at my website (same place where you downloaded this tool)  You may use any connection string from www.connectionstrings.com to connect to your available database.
      Thanks
      RV
    • RRV
      Hi,
      1.  LInQ to Entity Visualizer for VS2010 is ready.  Once production version of VS2010 is released i shall release.
      2.  I've tried to add feature to add/modify parameters.  I am trying to make it work better to any database as that is the main target idea.  If i could not, i shall release the feature later with a minor version release.
      3.  Will have the native SQL editable in order to enable users to play with SQL.
      4.  WIP to make the visualizer a WPF one to seamlessly integrate with VS2010.  The property grid is missing in WPF!!!  So please bear with it until we get one.
      
      Thanks for using LInQ to Entity Visualizer.
      Raja Venkatesh
    • Not sure what I'm doing wrong, but I can't seem to get the "AnySourceEntityQueryVisualizer.dll" working.  I've dropped it into both of the directories recommended above (C:\Users and C:\Program Files) and adding the "loadFromRemoteSources" node to the devenv IDE config, but I'm still not seeing any magnifying glass next to the LINQ to SQL query when I slap a watch on it.
      
      Possibly having issues because I'm developing on a Windows 7 64-bit machine?
      
      Jerry (Head Scratching) H.
      
    • RRV
      Hi Tical,
      Appreciate your requirement. Kindly understand the scope of this tool is to be able to connect to any database/datasource even for future databases.  So having a parameter editable and to support native datatypes is the challenge.  Perhaps i've a similar feature in datatool - a simple SQL query tool which i've hosted in the same website in using which you can add/edit parameters to SQL.  I'm building the same feature into L2E Visualizer too.  Please bear with me until i host that new version to website for public download.
      [Kindly rate my tool if it serves your purpose]
      Thanks
      Venkat
    • RRV
      Hi jhewett,
      Kindly note. If you use "Ado.NET entity data model" (a template in Visual Studio) to create edmx, and write L2E Linq query against this edmx, you'll be able to view magnifying glass.  In case you wish to see magnifying glass for Linq to SQL query (dbml), kindly use the visualizer coming as SQLLinqVisualizer project which is part of Visual Studio Samples.
      Regards
      Venkat
  • Exception on loading (remote assembly reference ?)
    23 Posts | Last post June 25, 2010
    • Hi, I'm sorry to tell you that I've experienced the exception below when i try to visualize an ObjectQuery. I'm using VS 2010RC on a Windows 7 x64 pc!
      
      
      See the end of this message for details on invoking 
      just-in-time (JIT) debugging instead of this dialog box.
      
      ************** Exception Text **************
      Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.RemoteObjectSourceException: Could not load file or assembly 'file:///c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers\AnySourceEntityQueryVisualizer.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> System.IO.FileLoadException: Could not load file or assembly 'file:///c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers\AnySourceEntityQueryVisualizer.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
      
    • I also get an exception in my VS 2010RC on a Windows 7 x32:
      
      See the end of this message for details on invoking 
      just-in-time (JIT) debugging instead of this dialog box.
      
      ************** Exception Text **************
      Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.RemoteObjectSourceException: Unable to cast object of type 'AnySourceEntityQueryVisualizer.AnySourceQueryVisualizer.SourceChooser' to type 'Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource'. ---> System.InvalidCastException: Unable to cast object of type 'AnySourceEntityQueryVisualizer.AnySourceQueryVisualizer.SourceChooser' to type 'Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource'.
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.DebugeeHost.CreateSourceInternal(String assemblyNameOrLoc, Byte[] assemblyBytes, String className, Boolean isLoc)
         --- End of inner exception stack trace ---
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.PrivateCallback.MaybeDeserializeAndThrowException(Byte[] data)
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.CreateViewer(IntPtr hwnd, HostServicesHelper hsh, SafeProxyWrapper proxy)
    • Hi Raja,
      
      I was wondering if you were ready to release your new version of the visualizer that supports the VS 2010 release.  I'm looking forward to trying it out, but with the current version posted I'm getting the exception others have been seeing:
      
      Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.RemoteObjectSourceException: Unable to cast object of type 'AnySourceEntityQueryVisualizer.AnySourceQueryVisualizer.SourceChooser' to type 'Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource'. ---> System.InvalidCastException: Unable to cast object of type 'AnySourceEntityQueryVisualizer.AnySourceQueryVisualizer.SourceChooser' to type 'Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource'.
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.DebugeeHost.CreateSourceInternal(String assemblyNameOrLoc, Byte[] assemblyBytes, String className, Boolean isLoc)
         --- End of inner exception stack trace ---
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.PrivateCallback.MaybeDeserializeAndThrowException(Byte[] data)
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.CreateViewer(IntPtr hwnd, HostServicesHelper hsh, SafeProxyWrapper proxy)
      
    • RRV
      Hi,
      Please note to use the newly released version 2.1 which would work for VS2010.  Let me know if you still face issues.
    • Hi Raja,
      
      I grabbed your 2.1 version today and I'm still getting an exception (below).  Any help?
      
      Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.RemoteObjectSourceException: Unable to cast object of type 'AnySourceEntityQueryVisualizer.AnySourceQueryVisualizer.LinqSourceChooser' to type 'Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource'. ---> System.InvalidCastException: Unable to cast object of type 'AnySourceEntityQueryVisualizer.AnySourceQueryVisualizer.LinqSourceChooser' to type 'Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource'.
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.DebugeeHost.CreateSourceInternal(String assemblyNameOrLoc, Byte[] assemblyBytes, String className, Boolean isLoc)
         --- End of inner exception stack trace ---
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.PrivateCallback.MaybeDeserializeAndThrowException(Byte[] data)
         at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.CreateViewer(IntPtr hwnd, HostServicesHelper hsh, SafeProxyWrapper proxy)
      
      
      ************** Loaded Assemblies **************
      mscorlib
          Assembly Version: 4.0.0.0
          Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
          CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
      ----------------------------------------
      Microsoft.VisualStudio.Platform.AppDomainManager
          Assembly Version: 10.0.0.0
          Win32 Version: 10.0.30319.1
          CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Platform.AppDomainManager/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Platform.AppDomainManager.dll
    • Yep - doesn't work. Can't load the dll (Win7 x64). Have a feeling it's looking for something in Program Files? VS is 32 bit so it shouldn't be a collision that way.
    • RRV
      Hi,
      I understand you are facing issues.  I'm sorry about that.  Please give me a day as i'm running high fever today. - Venkat.
    • RRV
      Hi,
      Please test the current version = 2.1 07-May-2010.  If you face issues let me know.  Also note you must have .NET 4.0 installed to get this visualizer working.
      Thanks
      RV
    • Hi Raja,
      I just looked and the only release posted right now is for May 2nd.  Let me know when the new release is posted and I will give it a try.  FYI, I do have .NET 4.0 installed.
    • RRV
      Hi LightningSrikes,
      I've sync'd the dll version, version on web page etc to 2.1.3.  To track i'm building a logging feature which i would upload post weekend.  In between please check if it works fine.
      Currently i've built parameter adding (for any database's datatypes) but not released.  Once the current version works fine i'll release the parameter feature with "datatool" which is another tool in the same page for free download.  On that success i will release it with this visualizer.
      Meanwhile i've some issues in converting SQL to LInQ query while working with databases like DB2.  Soon i hope to release "RV's SQL to LInQ" Visualizer in working condition.
    • Hi Raja,
      
      I tried your latest build, but I'm still getting an exception.  The exception is different than before:
      System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers\AnySourceEntityQueryVisualizer.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
      File name: 'file:///C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers\AnySourceEntityQueryVisualizer.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
         at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark
    • RRV
      Hi,
      Sorry on the late reply.
      Please copy the visualizer DLL into "My Documents\Visual Studio 2010\Visualizers" folder instead of "C:\ProgFiles\MSVS10.0\Common7\Packages\Debugger\Visualizers".
      For more details please read blog from Mr Jim Wooley at http://www.thinqlinq.com/Post.aspx/Title/LINQ-to-Entity-Visualizer.  Let me know if this solved.
      Thanks
    • Same problem.  I even added the following to my web.config as the exception suggests, but still no luck.
      <runtime>
          <loadFromRemoteSources enabled="true"/>
        </runtime>
      
      System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\xxxxxx\Documents\Visual Studio 2010\Visualizers\AnySourceEntityQueryVisualizer.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
      File name: 'file:///C:\Users\xxxxxx\Documents\Visual Studio 2010\Visualizers\AnySourceEntityQueryVisualizer.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
         at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark
    • RRV
      Hi,
      1.  Can i know if any other is facing the same issue?
      2.  Since this visualizer is developed using windows forms opposed to wpf form, please enable the following.
          a) In your current project properties go to Debug tab.
          b) Under "Enable Debuggers", select "Enable unmanaged code debugging".
      Save your project/solution.  Now try to use the Visualizer.
      Thanks for your patience.
      Regards
      RV
    • Unfortunately that didn't resolve it.  Still have the same problem.
    • RRV
      Lightningstrikes.  Sorry that it does'nt work for you.  Please bear with me while i prepare a VS2010 specific version.
      Meanwhile i find more downloads happening.  I hope it works for others.
      The datatool is almost ready except the "Enable LInQ query" part.  If VS2010 - Linq visualizer stabilizes i could release the datatool.
      Regards
      RV
    • RRV
      Hi,
      [Version: 2.1.4, 25-May-2010]
      After several simulations and testing with various environments i was able to locate a bug.  Hope now it solves the mystery for LightningStrikes.
      In the Query Result Screen, I've added an option to export/save the result to Excel/XML file.  After clicking the "Save to Excel", you may only give the desired output file name without extension.  This will open the result via your browser where you could opt to save as Excel.
      Next week we shall have
      1. The option to add/modify parameters to LInQ/SQL.
      2. Also visualize LInQ to SQL classes with same visualizer.
      
      Regards
      RV
    • Just in case anyone is still having the "System.NotSupportedException" problem on Vista/Windows 7.
      
      After copying the dll to your "Documents\Visual Studio 2010\Visualizers" folder, right click on the file and select unblock - windows doesn't trust the dll by default.
      
      Great Plugin btw...
    • RRV
      Thank you Dawid Potgieter,
      You saved my day.
      Ok now its time to support parameters in query.  Once i'm back from vacation i shall release parameters support.
      Regards
      RV
    • RRV
      Hi,
      A solution suggested by Andre Pageot,
      ****************************************
      Edit the devenv.exe.config
      Under the runtime element add this 
      <runtime>
      <loadFromRemoteSources enabled="true"/>
      Problem is then solved
      ****************************************
      Thanks Andre Pageot.
    • Hi,
      
      I started having the same problem when I migrated to VS2010 under WinXP. Dawid Potgieter solution worked for me even under XP.
      
      Thanks All...
    • Hi Raja,
      
      Can show the row count in the query result window. Would be a good feature.
      
      Thanks.
    • RRV
      Hi Kodster,
      Am about to release datatool with more features like parameters etc.  I will take the row count and more features of datatool which i'm just releasing into visualizer.
      
      Thanks
      RV
11 - 12 of 12 Items