Making dataset instances invisible to COM
Posted on 2006-06-20
I've got a C# assembly that's marked for COM Interop Registration. It contans a dataset definition (.xsd file in the Visual Studio IDE). When I look at the TLB file generated for the assembly, there's a bunch of objects from the dataset included. (for example, if the dataset is called AlphaDS, there's a default interface generated for the dataset called _AlphaDS, and a coclass entry for AlphaDS, plus default objects for the tables, rows and events defined in the dataset)
I'd like to mark the Dataset as COMVisible(false) so it doesn't show up in the TLB. I could mark the generated .cs file for the dataset with this attribute, but this file is auto-generated and the changes are lost each time I re-build the assembly.
Anyone have any ideas?