Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I suppress this COM Generics warning?

I'm compiling a VB.Net 2.0 app (created in VS2008) using msbuild, and now I've added a generic return type, it's giving me the following:

Warning: Type library exporter encountered a generic type instance in a signature. Generic code may not be exported to COM.

Having just spent ages removing all of the previous warnings, I don't really want to add a new one. Any idea how to get rid of it (aside from not using generics)?

I don't know what details I'd put in the attribute, or what number to put in the project-level ignore list.

like image 216
Grant Crofton Avatar asked Feb 26 '23 15:02

Grant Crofton


1 Answers

Do you have to expose that library to COM ? If not, specify ComVisible(false)

like image 58
Frederik Gheysels Avatar answered Feb 28 '23 16:02

Frederik Gheysels