Click here to Skip to main content
16,018,653 members
Articles / Programming Languages / XSLT

XML Visualizer v.2

Rate me:
Please Sign up or sign in to vote.
4.88/5 (107 votes)
16 Nov 2016CPOL5 min read 300.9K   18.7K   404   55
XML Visualizer v.2 improves the standard XML Visualizer in Visual Studio 2005, 2008, 2010, 2012, 2013 and 2015.

Introduction

XML Visualizer v.2 improves the standard XML Visualizer in Visual Studio 2005, 2008, 2010, 2012, 2013 and 2015.

  • "That's Hot! Every Developer should go and have a nicer Debugger Visualizer." - Channel9
  • "This is a real gem. I have been copying and pasting XML from the text visualizer to VSTO because the built-in XML visualizer pretty much sucks." - Asher Barak
  • "Developers can definitely be more productive if they use this tool." - .NET Developer
  • "For anyone who works a lot with XML, this extension is an absolute must. Good job." - LieberLieber
  • "If you've ever needed to work with XML files in Windows, and can't afford XMLSpy, get this now. Even if you don't have Visual Studio, the standalone app is worth its weight in bits." - SWiK Review

XML Visualizer v.2 is a free debug visualizer for Visual Studio 2005, 2008, 2010, 2012, 2013 and 2015. It uses Internet Explorer as the XML rendering engine and features many improvements over the standard XML Visualizer:

  • Execution of XPath queries and use of XPath functions
  • Create, edit and apply XSL transformations
  • Editor with both XML and XSLT debugging capabilities
  • Inject XML back into the running application
  • Validate XML and XSL against XSD
  • Search functionality

XML Visualizer v.2 works in all editions of Visual Studio 2005, 2008, 2010, 2012, 2013 and 2015 including Express Editions.

XML Visualizer v.2 is also available as a standalone application and as a User Control.

See Channel9 video review here.

See .NET Developer review here.

Image 1

XMLVisualizer/pic2.gif

XMLVisualizer/pic3.gif

XMLVisualizer/pic4.gif

XMLVisualizer/pic5.gif

XMLVisualizer/pic6.gif

Visual Studio Plugin Installation

Only the compiled DLL, XmlVisualizer.dll, is required to run and use XML Visualizer v.2.

Place XmlVisualizer.dll in:

  • My Documents\[Visual Studio version]\Visualizers, e.g.: My Documents\Visual Studio 2015\Visualizers (for Visual Studio 2015)

If the Visualizers directory doesn't exist, then create it manually.

If you want to use the visualizer for remote debugging, copy XmlVisualizer.dll to the same path on the remote computer.

If Visual Studio is open, then restart Visual Studio.

Source Code

The Source Code includes the following projects:

  1. Visualizer
  2. DebugVisualizer
  3. TestDebugVisualizer
  4. StandAloneVisualizer
  5. TestStandAloneVisualizer

Visualizer contains the primary Visualizer User Control and a form hosting the Visualizer User Control. The User Control contains the core functionality of XML Visualizer v.2.

DebugVisualizer is used to bind the Visual Studio debugger to the Visualizer.

TestDebugVisualizer is used to test the XML Visualizer v.2.

StandAloneVisualizer is the standalone version of XML Visualizer v.2.

TestStandAloneVisualizer is used to test the standalone version of XML Visualizer v.2.

Compiled assemblies will be placed in a "runtime" folder for the DebugVisualizer and the StandAloneVisualizer projects.

The Source Code is in C# and is available for Visual Studio 2012/2013 (for version 7.0 and above), and Visual Studio 2008 and Visual Studio 2010 (for version 6.9).

To build the DebugVisualizer and the StandAloneVisualizer projects, it requires ILMerge (not included) in XML Visualizer v.2 Source Code. Download ILMerge from here. Place ILMerge.exe in the same directory as XmlVisualizer.sln.

Note: Icons used in the application are FamFamFam Silk Icons from here.

Standalone

Standalone version of XML Visualizer v.2 can be used without Visual Studio.

User Control

By adding the XmlVisualizer.dll to the Visual Studio Toolbox, the Visualizer can be used as a User Control and thereby making all the features of XML Visualizer v.2 available in your application.

Please note that if you add the XmlVisualizer.dll as a User Control to the Visual Studio Toolbox, then the SharpDevelop TextEditor User Control will also be added to the toolbox.

Troubleshooting

Visual Studio 2015 will crash if using external debugger visualizers. Until Microsoft fixes the bug, the following workaround will enable support for Xml Visualizer v.2 7.0 in Visual Studio 2015:

Tools -> Options -> Debugging -> Enable "Use Managed Compatibility Mode".

Troubleshooting for the following error (for version 6.9):

Error: System.InvalidCastException: 
Unable to cast object of type 'XmlVisualizer.Visualizer' 
to type 'Microsoft.VisualStudio.DebuggerVisualizers.DialogDebuggerVisualizer'. 
at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.
DelegatedHost.CreateViewer(IntPtr hwnd, HostServicesHelper hsh, SafeProxyWrapper proxy)

If you have both Visual Studio 2005 and Visual Studio 2008 installed, there can be a conflict between Microsoft.VisualStudio.DebuggerVisualizers.dll version 8.0.0.0 (used by Visual Studio 2005) and Microsoft.VisualStudio.DebuggerVisualizers.dll version 9.0.0.0 (used by Visual Studio 2008).

Microsoft.VisualStudio.DebuggerVisualizers.dll version 9.0.0.0 replaces all functionality of version 8.0.0.0 and version 9.0.0.0 is also used by newer versions of Visual Studio 2005 (i.e. Visual Studio 2005 Express Editions).

To use Microsoft.VisualStudio.DebuggerVisualizers.dll version 9.0.0.0 and get support for XML Visualizer v.2, you'll have to do the following:

  1. Make sure that you have the .NET Framework Configuration Tool (mscorcfg.msc) installed. It's installed with the .NET Framework 2.0 SDK.
  2. Run "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mscorcfg.msc".
  3. Choose ".NET Framework 2.0 Configuration\My Computer\Configured Assemblies" and then "Configure an Assembly".
  4. Choose "Choose Assembly..." and select "Microsoft.VisualStudio.DebuggerVisualizers". It's important that it's version 8.0.0.0.
  5. Press "Finish".
  6. Choose the "Binding Policy"-tab and for "Requested Version" enter "8.0.0.0", and for "New Version" enter "9.0.0.0".
  7. Press "OK" and restart Visual Studio.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Denmark Denmark
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: Not works at all... Pin
Lars Hove Christiansen9-Nov-08 23:45
Lars Hove Christiansen9-Nov-08 23:45 
QuestionVisual 2005 Pin
Gil Shimer26-Oct-08 4:31
Gil Shimer26-Oct-08 4:31 
AnswerRe: Visual 2005 Pin
Lars Hove Christiansen26-Oct-08 23:01
Lars Hove Christiansen26-Oct-08 23:01 
GeneralRe: Visual 2005 Pin
Gil Shimer28-Oct-08 4:07
Gil Shimer28-Oct-08 4:07 
GeneralRe: Visual 2005 Pin
Lars Hove Christiansen28-Oct-08 21:58
Lars Hove Christiansen28-Oct-08 21:58 
GeneralRe: Visual 2005 Pin
Gil Shimer29-Oct-08 0:33
Gil Shimer29-Oct-08 0:33 
GeneralRe: Visual 2005 Pin
Lars Hove Christiansen29-Oct-08 1:42
Lars Hove Christiansen29-Oct-08 1:42 
GeneralRe: Visual 2005 Pin
zippy19817-Nov-08 4:36
zippy19817-Nov-08 4:36 
Lars,

I have the same issue as Gil on visual studio 2005 running xp. I am testing it from a nunit test ReSharper 4.1.

I will create a test case to run from a standard console application, and I will also try to test from Visual Studio 2008 and 2003. My exception dialog is below.

Justin

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

************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'XmlVisualizer.Visualizer' to type 'Microsoft.VisualStudio.DebuggerVisualizers.DialogDebuggerVisualizer'.
at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.CreateViewer(IntPtr hwnd, HostServicesHelper hsh, SafeProxyWrapper proxy)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.CommonIDE
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.762
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.CommonIDE/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.CommonIDE.dll
----------------------------------------
Microsoft.VisualStudio.DebuggerVisualizers
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.DebuggerVisualizers/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.DebuggerVisualizers.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
XmlVisualizer
Assembly Version: 3.3.0.0
Win32 Version: 3.3.0.0
CodeBase: file:///C:/Documents%20and%20Settings/justin.dearing/My%20Documents/Visual%20Studio%202005/Visualizers/XmlVisualizer.dll
----------------------------------------
Microsoft.VisualStudio.DebuggerVisualizers
Assembly Version: 9.0.0.0
Win32 Version: 9.0.30729.1
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.DebuggerVisualizers/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.DebuggerVisualizers.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitdebugging="true">


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
GeneralRe: Visual 2005 Pin
zippy19817-Nov-08 11:38
zippy19817-Nov-08 11:38 
GeneralRe: Visual 2005 Pin
Lars Hove Christiansen10-Nov-08 2:12
Lars Hove Christiansen10-Nov-08 2:12 
QuestionThe code Pin
kornakar15-Sep-08 20:38
kornakar15-Sep-08 20:38 
AnswerRe: The code Pin
Lars Hove Christiansen15-Sep-08 21:24
Lars Hove Christiansen15-Sep-08 21:24 
JokeRe: The code Pin
kornakar17-Sep-08 3:12
kornakar17-Sep-08 3:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.