Yeah, this happens because mscorlib.dll includes a type named "System.Internal", and System.Windows.Forms.dll includes a namespace with the same name, so you can't merge them into the same type collection.
There are two things you can do - (1) use two separate type collections, or (2) use a filter to exclude types you don't need. The conflict here involves only internal types that probably aren't useful. Here's how to include only public types and avoid the conflict:
Good luck!
There are two things you can do - (1) use two separate type collections, or (2) use a filter to exclude types you don't need. The conflict here involves only internal types that probably aren't useful. Here's how to include only public types and avoid the conflict:
Predicate<Type> filter = type => type.IsPublic; var collection = new HostTypeCollection(filter, "mscorlib", "System.Windows.Forms");