Closed SeppPenner closed 1 month ago
Is there any fix for this problem? I faced with similar exception, after migration my app from .NET 6 to .NET 8:
"Type": "System.TypeLoadException", "Message": "Could not load type 'NJsonSchema.Annotations.JsonSchemaTypeAttribute' from assembly 'NJsonSchema, Version=11.0.2.0, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102'.", "Source": "System.Private.CoreLib",
You are referencing old binaries somewhere which do not know that JsonSchemaTypeAttribute
should be loaded from assembly NJsonSchema.Annotations
.
@lahma Yes, that was an issue. I had an old version of NJsonSchema in my app, which contains JsonSchemaTypeAttribute. After upgrading to the latest version of NSwag.AspNetCore (NJsonSchema), I should read JsonSchemaTypeAttribute from NJsonSchema.Annotations. So I fix it in the meantime on that way.
I get the exception after I upgraded my project to Net8 and added all the Net8 related packets.
NSwag.AspNetCore is on 14.0.3, NJsonSchema is on 11.0.0 for all (transient) dependent packets. Newtonsoft.Json is on 13.0.3 for all (transient) dependent packets.