ebceu4 / protobuf-csharp-port

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

Disable CLSCompliant warnings #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Classes generated by protogen feature the CLSCompliant attribute, however in an 
assembly that is not marked as CLSCompliant this will generate warning CS3021 
('<class>' does not need a CLSCompliant attribute because the assembly does not 
have a CLSCompliant attribute).

My suggestion would be to add 3021 to the pragma warning disable list. I can't 
think of any reason anyone would actually be interested in this warning.

Original issue reported on code.google.com by mycr...@gmail.com on 27 Feb 2012 at 9:01

GoogleCodeExporter commented 9 years ago
Alternatively, just set the cls_compliance option to false, and it won't 
generate the attribute at all.

Original comment by jonathan.skeet on 27 Feb 2012 at 9:42

GoogleCodeExporter commented 9 years ago
I'll add 3021 to the disabled warnings list next time I'm in there.  In the 
mean time you can disable this either in the proto file itself, or from the 
command line:

command-line argument:  -cls_compliance=false

Original comment by Grig...@gmail.com on 18 May 2012 at 12:30

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/protobuf-csharp-port/source/detail?r=0ff930f279359ff36a
c309ebf5880b46909aa43c

Added 3021 to the ignore list.

Original comment by Grig...@gmail.com on 10 Oct 2012 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by Grig...@gmail.com on 10 Oct 2012 at 9:53