Hi @Liangjun Hu ,
I understand that you would like to use AvroContainer.CreateGenericReader to read avro file and it says that the Microsoft.Hadoop.Avro 1.5.6 is not compatible.
We see that the Microsoft.Hadoop.Avro package has been depreciated as it is legacy and is no longer maintained. Which is now not compatible with the .Net 8.0 Framework, since it focuses on older versions of the .NET Framework.
However, to read the Avro files in a .NET 8.0 project, you can use Confluent's Apache.Avro
package and Chr.Avro
both has its own specifications such as.
Apache.Avro
package is designed for compatibility with .NET Core and newer frameworks. It offers functionality for reading and writing Avro files and should be suitable for your project.
Chr.Avro
package is flexible, and it provides features like schema models, type resolution, and binary serialization.By using any of the above packages you would be able to read Avro files in your .NET project targeting Net8.0 without any compatibility issues.
I hope this helps! Let me know if you have any further questions or if the issue still persists. We will be glad to assist you closely.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.