Click here to Skip to main content
11,934,783 members (45,017 online)
Click here to Skip to main content
Add your own
alternative version


365 bookmarked

XML Visualizer v.2

, 15 Oct 2015 CPOL
Rate this:
Please Sign up or sign in to vote.
XML Visualizer v.2 improves the standard XML Visualizer in Visual Studio 2005, 2008, 2010, 2012 and 2013.


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.






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 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.


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 (used by Visual Studio 2005) and Microsoft.VisualStudio.DebuggerVisualizers.dll version (used by Visual Studio 2008).

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

To use Microsoft.VisualStudio.DebuggerVisualizers.dll version 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
  5. Press "Finish".
  6. Choose the "Binding Policy"-tab and for "Requested Version" enter "", and for "New Version" enter "".
  7. Press "OK" and restart Visual Studio.


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


About the Author

No Biography provided

You may also be interested in...

Comments and Discussions

QuestionI get the "Unable to cast object of type 'XmlVisualizer.DebugVisualizer'" error message in VS 2013 Pin
John Marion22-Oct-15 7:04
memberJohn Marion22-Oct-15 7:04 
BugVS2013 FileLoadException/NotSupportedException Pin
Matt T Heffron20-Oct-15 10:47
professionalMatt T Heffron20-Oct-15 10:47 
SuggestionRe: VS2013 FileLoadException/NotSupportedException Pin
Mau Galindo4-Nov-15 6:50
professionalMau Galindo4-Nov-15 6:50 
Generalwhat are the difference of these builds? Pin
Southmountain17-Oct-15 10:29
memberSouthmountain17-Oct-15 10:29 
BugError in Visual Studio 2013 Pin
Andrey Kuznetsov (Russia)11-Sep-15 0:05
professionalAndrey Kuznetsov (Russia)11-Sep-15 0:05 
QuestionIt does not appear in VS! Pin
salvuccio15-Nov-14 7:14
membersalvuccio15-Nov-14 7:14 
GeneralMy vote of 5 Pin
Nicke Da Silva Manarin17-May-13 5:12
memberNicke Da Silva Manarin17-May-13 5:12 
GeneralRe: My vote of 5 Pin
Lars Hove Christiansen17-May-13 9:17
memberLars Hove Christiansen17-May-13 9:17 
GeneralMy vote of 5 Pin
rspercy6520-Nov-12 3:19
memberrspercy6520-Nov-12 3:19 
GeneralRe: My vote of 5 Pin
Lars Hove Christiansen20-Nov-12 4:01
memberLars Hove Christiansen20-Nov-12 4:01 
GeneralMy vote of 5 Pin
Orcun Iyigun30-Mar-12 13:57
memberOrcun Iyigun30-Mar-12 13:57 
SuggestionVS 2010 Extension Manager? Pin
Marco Schmittnägel23-Feb-12 22:16
memberMarco Schmittnägel23-Feb-12 22:16 
GeneralGreat! Pin
Mr. Mox22-Feb-12 0:41
memberMr. Mox22-Feb-12 0:41 
QuestionNice job Pin
Mike Hankey18-Feb-12 5:39
memberMike Hankey18-Feb-12 5:39 
GeneralMy vote of 5 Pin
Dean Oliver16-Feb-12 9:44
memberDean Oliver16-Feb-12 9:44 
QuestionVisualizer tries to open file with my default xml editor Pin
Daniel C.10-Jul-11 15:30
memberDaniel C.10-Jul-11 15:30 
GeneralProblem wih VS2010 Pin
fatih_senel10-Feb-11 5:22
memberfatih_senel10-Feb-11 5:22 
GeneralRe: Problem wih VS2010 Pin
Lars Hove Christiansen28-Feb-11 4:26
memberLars Hove Christiansen28-Feb-11 4:26 
GeneralSweet Pin
Sacha Barber19-Jan-11 3:59
mvpSacha Barber19-Jan-11 3:59 
GeneralMy vote of 3 Pin
mungflesh13-Dec-10 6:19
membermungflesh13-Dec-10 6:19 
GeneralRe: My vote of 3 Pin
Sacha Barber19-Jan-11 3:59
mvpSacha Barber19-Jan-11 3:59 
GeneralWould be cool to be able to use a url for the xml Pin
jonaseriksson29-Sep-10 1:43
memberjonaseriksson29-Sep-10 1:43 
QuestionAlways the default visualizer! Pin
Andromeda Shun16-Sep-09 0:08
memberAndromeda Shun16-Sep-09 0:08 
AnswerRe: Always the default visualizer! Pin
Lars Hove Christiansen16-Sep-09 1:00
memberLars Hove Christiansen16-Sep-09 1:00 
Hi Andromeda!

Thank you for you input.

Visual Studio are using the last used visualizer as the default one. So if you just have used the text visualizer, then the default one will be the text visualizer.

Since Visual Studio internally handles Xml as strings, then it's not possible to tell Visual Studio to use a certain visualizer for Xml and another one for text.

It's a good idea to let the Xml Visualizer v.2 display the plain text value if the content cannot be validated as Xml. But then again, when is the content just plan text and when is it wrong formatted Xml that cannot be validated? I don't think it's possible to tell the difference programmatically.

Best Regards

GeneralRe: Always the default visualizer! Pin
Andromeda Shun16-Sep-09 23:04
memberAndromeda Shun16-Sep-09 23:04 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151126.1 | Last Updated 15 Oct 2015
Article Copyright 2008 by Lars Hove Christiansen
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid