Archived

This forum has been archived. Please start a new discussion on GitHub.

supressing warnings in ice generated c# code

Hi all

We use ICE to communicate from a windows host (c#) to a embedded Windows CE device (C++). All works fine, but there are a lot of warnings if I want to use the built in documentation feature in VS2005 because the ICE compiler doesn't generate XML comments for the c#code.

In c# you can enter the #pragma warning disable 1591 in each file to suppress these warnings. Is there a way to have this directive in each generated *.cs file?

Thanks

Lothar

Comments

  • Could you post a minimal example that illustrates the problem please? I would like to have a look at it but, having never used the documentation feature myself, I need a bit of a leg up ;)

    Cheers,

    Michi.
  • Could you post a minimal example that illustrates the problem please?

    Of course :) . the following is an example of a piece of documented code:
    namespace Sensirion.Framework
    {
        /// <summary>Enumeration of log severity levels.</summary>
        public enum LogSeverity
        {
            /// <summary>Severity level of "Debug"</summary>
            Debug = 1,
            /// <summary>Severity level of "Info"</summary>
            Info = 2,
            /// <summary>Severity level of "Warning"</summary>
            Warning = 3,
            /// <summary>
            /// Severity level of "Error"
            /// </summary>
            Error = 4,
            Fatal = 5
        }
    }
    

    For the last entry, the complier creates the following warning if you turn on the XML Document export error (Check project properties in the Build tab: "XML documentation file:").
    Warning	1	Missing XML comment for publicly visible type or member 'Sensirion.Framework.LogSeverity.Fatal'	....
    

    if I set a
    #pragma warning disable 1591
    
    at the top of the file, I will not get this warning and all is OK. This is very useful if you have some undocumented files, like the ICE generated files, so you could turn of the warnings that aren't important, to see the "real" warnings.

    I hope that was detailed enough, otherwise just ask again for example ;)

    Lothar
  • Thanks for that, that's plenty enough detail. I'll have look whether we can include something to help with this in a future release.

    Cheers,

    Michi.