DebuggingVisualizer for multiple versions of Visual Studio

Can I create a Visualizer for debugging that can be used in several versions of Visual Studio?

The Visualizer debugger must reference Microsoft.VisualStudio.DebuggerVisualizers.dll, and for each version of Visual Studio there is a separate version of the assembly. These versions seem to be incompatible. For example, if I built a visualizer that references Microsoft.VisualStudio.DebuggerVisualizers v9.0, it can be used in Visual Studio 2008, but not in Visual Studio 2010.

I am looking for a way to configure at least Visual Studio 2008 and Visual Studio 2010, saving only one project for the visualizer. Duplicating the project and changing only links to Microsoft.VisualStudio.DebuggerVisualizers will work, but this creates a horror of service.

+3
source share
1 answer

If your code base is exactly the same for both reference assemblies, then I would suggest the same approach as I suggested in this question: Visual Studio Installer - changing application resource

The idea is to have 1 project in which you have the MSBuild property for which VS is targeted, and depending on this property you can reference the VS 2008 or VS 2010 DebuggerVisualizers assembly.

The only other solution I see is the one you mentioned is having two separate project files for the target version of VS. I do not think it will be difficult to support two versions if you do not duplicate the code. And you can avoid code duplication by including code files as links in your projects.

+1

All Articles