Hi Kenneth,
I finally found the place where I figured out the CTP story with .NET 6!
It was in February, but I had completely forgotten about it.
The sample was part of the first project in the sponsors-only repository on GitHub.
The low tier is at $14 per month, and you can cancel at any time.
Maybe you'd like to consider that :-)
Anyway, the main discovery I made in February that is relevant to your question relates to how COM interfaces are exposed with .NET 6.
You now need an explicit 'default interface' for your type - this will cause the class to implement IDispatch (if it is ComVisible).
So you can change your code with an empty interface like this:
public interface IMyUserControl { }
[ComVisible(true)]
[Guid("E2197CEB-6ADC-4EAB-80FD-0A9EE161BA14")]
[ComDefaultInterface(typeof(IMyUserControl))]
public class MyUserControl : UserControl, IMyUserControl { }
Then the control should appear correctly.
I don't understand why marking the class with [ClassInterface(ClassInterfaceType.AutoDispatch)] does not work for creating an IDispatch interface in this scenario.
-Govert