ch-robinson / dotnet-avro

An Avro implementation for .NET
https://engineering.chrobinson.com/dotnet-avro/
MIT License
134 stars 49 forks source link

Unable to generate schema for type defined in .NET 5 assembly #127 #197

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hey,

Related with #127. I'm having difficulties generating Avro schemas.

I'm using the latest version. Using rider dotPeek I see the data on the assembly.

dotnet avro create --assembly .\bin\Debug\net5.0\Notes.IntegrationEvents.dll --type Notes.IntegrationEvents.NoteCreated --temporal-behavior epochmicroseconds > C:\Temp\NoteCreated .avsc

dstelljes commented 2 years ago

Can you share the message you’re receiving? I’ve tried the latest CLI version (8.0.1) on DLLs targeting net5.0 and haven’t been able to reproduce the issue.

ghost commented 2 years ago

Error: The type could not be found. You may need to provide additional assemblies.

ghost commented 2 years ago

More info: Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (0x80131621)

ghost commented 2 years ago

Had to replace the Newtonsoft.Json dll