Search code examples
.nettypeconverter

How do you mark class with TypeConverter that is not in referenced solution?


I have a class that I've written a TypeConverter for. I want to keep the TypeConverter separate from the main solution, as it is only needed at design time and have an extensibility project now that contains the TypeConverter. Thus, when I deploy, I don't need to deploy the extensibility assembly at all.

However, I can't figure out the appropriate string to use in the attribute to actually connect the class to the converter. Note I can't use this:

[TypeConverter(typeof(MyConverter)]

because MyConverter is in a project that isn't referenced. I need to use the string overload, but can't figure out what to use:

[TypeConverter("what the heck goes in here!")]

I think I need maybe a path to the assembly, maybe a GUID, the class name...just not sure...


Solution

  • [TypeConverter("TypeName, AssemblyFullName")]