Warning CA1405 on the auto generated designer.cs file of Dataset RRS feed

  • Question

  • When I run Code Analysis on my project I get a warning :

    Warning 34 CA1405 : Microsoft.Interoperability : 'DocumentsDataSet' is marked ComVisible(true) but has the following ComVisible(false) types in its object hierarchy: 'DataSet' S:\D\VS Projects\InstallShield\ELEMKA Documents\ELEMKA Documents\ELEMKA Documents\DocumentsDataSet.Designer.cs 25 ELEMKA Documents

    and is repeated for a lot of objects in the dataset.

    This file is auto generated and my question is how to handle those warnings.

    I see the thread on msdn for this warning that says not to suppress warnings of this type : http://msdn.microsoft.com/en-us/library/ms182202.aspx

    I can't understand how to handle this as the code is auto generated!

    Best Regards

    Friday, September 21, 2012 9:06 AM


  • Hi panagiotis,

    Thank you for visiting the MSDN forum.

    Since this forum is to discuss the VS code analysis tool. We are not sure which kind of app you are running. I suggest you try to debug your app, and then check which line code generated this issue and change it. Like the suggestion in the MSDN document provided by you, you would make the base types COM visible or the derived type COM invisible.



    If no help, you could share us this app, we will try to check it in our PC, please attach your Visual Studio project, and you can upload it to the sky driver, and then share the download link in your post.

    Best Regards,

    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 24, 2012 10:31 AM