Search code examples
c#.netwinformscomactivex

How to fix a warning "Non COM-visible value type is being referenced either from the type currently being exported or from one of its base types"?


I develop an ActiveX Component. It inherits from System.Windows.Forms.UserControl.

When I build my project in Visual Studio, then I get 0 errors and about 20 warnings looks like the following sample: "warning : Type library exporter warning processing 'ActiveXControl.ActiveXControl.get_Anchor(#0), ActiveXControl'. Warning: Non COM visible value type 'System.Windows.Forms.AnchorStyles' is being referenced either from the type currently being exported or from one of its base types."

I have tried to google a solution to fix these warnings, but I can't find anything that helps me.

Any idea how can I fix these warnings?


Solution

  • Look an answer in first comment of the post.