plutoo / protobuf-csharp-port

Automatically exported from code.google.com/p/protobuf-csharp-port
Other
0 stars 0 forks source link

CompilerGeneratedAttribute and GeneratedCodeAttribute no longer present on generated types #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The latest version has removed these two attributes from generated types. This 
has completely broken my build, since my code and style analysis does not know 
that it's generated code anymore.

Example of 2.4.1.473 output:

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")]
  public static partial class Core {

Example of 2.4.1.521 output:

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public static partial class Core {

Original issue reported on code.google.com by kent.boo...@gmail.com on 17 May 2013 at 12:57

GoogleCodeExporter commented 9 years ago
Apologies. Somehow these attributes were being generated for me without having 
specified -generated_code_attributes=true. Digging through the code helped me 
find that option. Now that I've added it, everything is back to normal.

I have no idea why it was generating these attributes in 2.4.1.473 without me 
specifying that option, but never mind - it was a simple one line change and 
I'm happy now. Please close this issue.

Thanks.

Original comment by kent.boo...@gmail.com on 17 May 2013 at 1:16

GoogleCodeExporter commented 9 years ago
This was introduced to support  "Issue 46: Add support for Portable Libraries". 
Glad you found the option to enable it ;)

Original comment by Grig...@gmail.com on 17 May 2013 at 2:46