Where do I find Microsoft.VisualStudio.DebuggerVis

2019-04-28 22:18发布

问题:

A project won't compile because of a missing assembly. The file that causes the error has a

using Microsoft.VisualStudio.DebuggerVisualizers;

The VisualStudio part is marked in red. What do I have to install to fix it? To me it sounds like something that would have come with Visual Studio, but that is what I am using, so it is installed...

Clarification: I know what assembly it exists in, and the reference is added earlier to the project references. But how do I get it? What SDK do I have to install? Or have I forgotten to check something off when I installed Visual Studio?

回答1:

You should be able to find it in the "Add Reference" dialog in the .Net tab.

If not, the Microsoft.VisualStudio.DebuggerVisualizers.dll lives in the Common7\IDE\PublicAssemblies subdirectory of Visual Studio's installation directory. You could add it manually from there.



回答2:

For Visual Studio 2010 the Microsoft.VisualStudio.DebuggerVisualizers assembly exists under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0 (or relevant Program Files root).

For a debugger visualizer to target Visual Studio 2010 it must reference the 10.0 version of this assembly or it will fail with an invalid cast exception.



回答3:

You should be able to find the assembly under the ".NET" list of assemblies in the "Add Reference" dialog.



回答4:

To anyone still looking for this - it's been moved to NuGet