views:

24

answers:

1

I have a TypeConverter for a TopMostNode class. It extends ExpandableObjectConverter. The TopMostNode has two properties. Setting those in the property grid results in correctly serialized code to the designer. However, if I type in text for the property, I get a "Property value is not valid" error and the details say:

Object of type 'TopMostNode' cannot be converted to type 'TopMostNode'.

I'm baffled. When I step through the type converter ConvertFrom code, it runs as expected. I don't even know were to start looking for an issue like this.

+1  A: 

You probably have two different versions of the same assembly loaded.

SLaks
See http://stackoverflow.com/questions/2450087/how-do-you-mark-class-with-typeconverter-that-is-not-in-referenced-solution
SLaks
I checked and the extensibility project is referencing the assembly I'm working on. Any way to tell if more than one is loaded?
Greg McGuffey
Attach a second copy of VS to the first one, break on exceptions, then check the `Type` and `Assembly` objects for the value and property.
SLaks