Calling Visual Studio Visualizer Manually

Scenario

I try to manually call the Visual Studio visualizer from the code / immediate launch window until it works.

I wrote a simple console application with the following code:

var dataset = new System.Data.DataSet();

Then I added a dataset to the viewport and visualized it using the DataSet Visualizer . As expected, it worked.

As soon as I did this, I entered the following code into the nearest window:

new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost(dataset, typeof(EnhancedDataSetVisualizer.DataSetVisualizer)).ShowVisualizer();

This caused the following exception ( complete exception ):

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Debugger.DataSetVisualizer, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Debugger.DataSetVisualizer, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, 
….

This is really strange for me, because if I look in Debug-> Widnow-> Modules in Visual Studio, I see that DataSetVisualizer.dll is already loaded:

Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll   C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers\Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll No  No  Cannot find or open the PDB file.       18  10.0.30319.1    18/03/2010 12:06 PM 77AB0000-77AC2000   [6784] PresentingBugAid.vshost.exe: Managed (v2.0.50727)    

, . ( ):


file:///C:/SVN/Debugger/src/Test/PresentingMyTest/PresentingMyTest/bin/Debug/Microsoft.VisualStudio.Debugger.DataSetVisualizer.DLL.
LOG: Attempting download of new URL 
...

Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll c:\SVN\Debugger\src\Test\PresentingMyTest\PresentingMyTest\bin\Debug\, . , , , , . , .

, , , - Visualizer Visualizer (devenv.exe), debuggee (PresentingMyTest.exe). , Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll, , , , .

, , VisualizerDevelopmentHost, DataSetVisualizer Show , , . ?

, , , , , .

!

+5
1

, Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost ShowVisualizer()? , .

0

All Articles