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

slice2cs 3.3.0 Improvements

Here are couple of minor and easy tweaks for slice2cs:

1. Add System.CodeDom.Compiler.GeneratedCodeAttribute to all the classes in the resulting .cs file. This notifies code analysis tools, such as FXCop, that the code is generated and can be (optionally) ignored.

2. Add "#pragma warning disable 1591" to the top of each generated cs file. This suppresses the "Missing XML comments" warning when you enable generating an XML documentation file for your project. Ideally, all the types and members would be documented as this would provide Intellisense in Visual Studio, but the easy way is to just disable the warning for the file.

3. This might be a little more work, but a "cs:partial" metadata directive that would add the partial keyword to a class. This would make it possible to add methods, properties, etc to a class that are C# specific without deriving a new type.


  • Thanks for the suggestions! We'll have a look at this for the next major release.
  • Hi michi,

    Are partial classes available in 3.4 release?
  • Yes. If you grab 3.4b, you'll find that classes, interfaces, structs, and exceptions are now generated as partial.


  • Hi Michi,

    now that item 3 (partial classes) is out in 3.4, when do you think Cory's items 1 (GeneratedCodeAttribute) and 2 (disable warning 1591) will be released?

    Cory calls them minor tweaks, but these simple features would make a big difference in my project, as the work-arounds/consequences are rather intrusive.

    Re item 2
    If a #pragma looks ugly, prepending a line with just a "///" before every undocumented class, interface and method will do just as fine.

  • bernard
    bernard Jupiter, FL
    Hi Alessio,

    Welcome to our forums!

    These features are under consideration, but it's unclear when we'll get to them.

    If you are working on a commercial project or can't wait, please contact and I am sure we'll be able to help.