views:

75

answers:

0

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!