开发者

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

开发者 https://www.devze.com 2022-12-30 04:54 出处:网络
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:

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!

0

精彩评论

暂无评论...
验证码 换一张
取 消