Introduction

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

  • "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 and 2010. 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 and 2010 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.

pic2.gif

pic3.gif

pic4.gif

pic5.gif

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 2010\Visualizers (for Visual Studio 2010)
  • My Documents\Visual Studio 2008\Visualizers (for Visual Studio 2008)
  • My Documents\Visual Studio 2005\Visualizers (for Visual Studio 2005)

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 2008 and Visual Studio 2010.

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

Troubleshooting for the following error:

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.
推荐.NET配套的通用数据层ORM框架:CYQ.Data 通用数据层框架