[ 
https://issues.apache.org/jira/browse/AVRO-3453?focusedWorklogId=753682&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753682
 ]

ASF GitHub Bot logged work on AVRO-3453:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Apr/22 20:56
            Start Date: 06/Apr/22 20:56
    Worklog Time Spent: 10m 
      Work Description: KyleSchoonover commented on code in PR #1605:
URL: https://github.com/apache/avro/pull/1605#discussion_r844415984


##########
lang/csharp/src/apache/test/AvroGen/AvroGenHelper.cs:
##########
@@ -93,20 +93,21 @@ public static Assembly 
CompileCSharpFilesIntoLibrary(IEnumerable<string> sourceF
                 {
                     typeof(object).Assembly.Location,
                     typeof(Schema).Assembly.Location,
+                    
typeof(System.CodeDom.Compiler.GeneratedCodeAttribute).Assembly.Location,
                     Path.Combine(assemblyPath, "System.Runtime.dll"),
                     Path.Combine(assemblyPath, "netstandard.dll")
                 };
 
                 // Create compiler
                 CSharpCompilation compilation = CSharpCompilation
-                    .Create(assemblyName)
-                    .WithOptions(new 
CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary))
-                    .AddReferences(assemblies.Select(path => 
MetadataReference.CreateFromFile(path)))
-                    .AddSyntaxTrees(sourceFiles.Select(sourceFile =>
-                    {
-                        string sourceText = 
System.IO.File.ReadAllText(sourceFile);
-                        return CSharpSyntaxTree.ParseText(sourceText);
-                    }));
+                .Create(assemblyName)

Review Comment:
   Sorry, I've been busy.  Easy fix.  For some reason I thought we were talking 
about tabbing somewhere else.  Yeah, VS won't change that, won't revert it back 
either.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 753682)
    Time Spent: 6.5h  (was: 6h 20m)

> C# Avrogen Add Generated Code Attribute
> ---------------------------------------
>
>                 Key: AVRO-3453
>                 URL: https://issues.apache.org/jira/browse/AVRO-3453
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: csharp
>    Affects Versions: 1.11.1
>            Reporter: Kyle Schoonover
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 6.5h
>  Remaining Estimate: 0h
>
> Development environments that use Code Analysis or something similar attempt 
> to exclude auto generated code.  By adding this attribute to generated 
> classes, code analysis will skip over evaluating the code.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to