How to use Visual Studio debugger visualizers built against a different framework version?

Posted by michielvoo on Stack Overflow See other posts from Stack Overflow or by michielvoo
Published on 2010-05-16T02:24:49Z Indexed on 2010/05/16 2:30 UTC
Read the original article Hit count: 297

I compiled the ExpressionTreeVisualizer project found in the Visual Studio 2010 samples but when I try to use it in a .NET 3.5 project I get the exception below:

Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft\Visual Studio 2010\Common7\Packages\Debugger\Visualizers\ExpressionTreeVisualizer.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

The sample project had the TargetFrameworkVersion set to v4.0 and after changing it to v3.5 and building it now works in my project.

I changed the source code and project file and rebuilt it so that I now have two expression tree visualizers, one for v3.5 projects and one for v4.0 projects. Is there a better way?

Thanks!

© Stack Overflow or respective owner

Related posts about visual-studio-debugging

Related posts about debugging-visualizers