Open AdrianStrugala opened 1 year ago
I can confirm, that there is some problem with running the .NET Framework host. For me, I am getting an exception:
HResult=0x80131534
Message=The type initializer for 'SolTechnology.Avro.AvroObjectServices.BuildSchema.ReflectionSchemaBuilder' threw an exception.
Source=SolTechnology.Avro
StackTrace:
at SolTechnology.Avro.AvroObjectServices.BuildSchema.ReflectionSchemaBuilder..ctor(AvroSerializerSettings settings) in E:\workspace\AvroConvert\src\AvroConvert\AvroObjectServices\BuildSchema\ReflectionSchemaBuilder.cs:line 87
at SolTechnology.Avro.AvroConvert.GenerateSchema(Type type) in E:\workspace\AvroConvert\src\AvroConvert\AvroConvert.GenerateSchema.cs:line 30
at ConsoleApp1.Program.Main(String[] args) in E:\workspace\AvroConvert\ConsoleApp1\Program.cs:line 14
This exception was originally thrown at this call stack:
Inner Exception 1:
FileNotFoundException: Could not load file or assembly 'Portable.System.DateTimeOnly, Version=6.0.3.3, Culture=neutral, PublicKeyToken=16fb7a27ac3b9689' or one of its dependencies. The system cannot find the file specified.
Might be connected to nuget source, not sure though.
If I reference Portable.System.DateTimeOnly
nuget package directly from the host .NET Framework app, the AvroConvert is working. It seems like the way how the package is configured does not enforce the installation of dependent nuget packages.
I am really not sure how to resolve this problem, if you have any suggestions, I am open to them.
Discussed in https://github.com/AdrianStrugala/AvroConvert/discussions/99