Often when writing workarounds for shortcomings in a library, it is preferable to avoid reflection and re-writing string functions. In vs-mef one of the internal classes is often involved for keys in e.g. hash tables:
internal static class ContractNameServices // internal :(
{
// ...
internal static string GetTypeIdentity(Type type, bool formatGenericName) // internal :(
// a.s.o.
}
I believe it would be helpful if this class and its methods were public.