You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/04/06 17:23:27 UTC

[GitHub] [avro] zcsizmadia commented on a diff in pull request #1605: AVRO-3453: Add GeneratedCodeAttribute to generated code by avrogen

zcsizmadia commented on code in PR #1605:
URL: https://github.com/apache/avro/pull/1605#discussion_r844200517


##########
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:
   Hmmm, my VS does not do that. Since it is not related to this PR, could you revert that formatting change?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org