简体   繁体   中英

Visual Studio custom debugger visualizer cannot load dependency

I created a class library with some custom debugger visualizers -- simple things like viewing a System.Drawing.Image or creating a swatch for System.Drawing.Color. Now I am trying to add a visualizer for a class that depends on an assembly reference (Aspose.Cells in case anyone is wondering). When I attempt to use this visualizer, I get the following exception:

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

The other visualizers (such as for System.Drawing.Image) work fine.

How do you suggest I solve this problem?

Thanks in advance!

This is the key problem

This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Visual Studio 2012 uses .Net 4.5.0. This assembly was most likely built in Visual Studio 2013 which uses 4.5.1. In order to make this work you're going to need to recompile the Visualizer for 4.5.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM