imazen / imageflow-dotnet

The official .NET API for Imageflow, the Rust image processing and optimization engine for web servers
GNU Affero General Public License v3.0
143 stars 25 forks source link

Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll #33

Closed paulflo150 closed 2 years ago

paulflo150 commented 3 years ago

Hi, I am using .net 5 and I see several of these exceptions when calling imageflow for the very first time only:

` Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("Cannot implicitly convert type 'Newtonsoft.Json.Linq.JValue' to 'string'. An explicit conversion exists (are you missing a cast?)") Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("Cannot implicitly convert type 'Newtonsoft.Json.Linq.JValue' to 'string'. An explicit conversion exists (are you missing a cast?)")

Exception caught: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("'Newtonsoft.Json.Linq.JObject' does not contain a definition for 'name'") Exception caught: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("'Newtonsoft.Json.Linq.JObject' does not contain a definition for 'name'") `

Has anyone else come across this problem?

As a side note, are there any plans on removing the dependency to Newtonsoft?

Thanks!

lilith commented 3 years ago

What version of Newtonsoft.Json are you using?

On Sat, May 29, 2021, 11:13 AM Paul @.***> wrote:

Hi, I am using .net 5 and I see several of these exceptions when calling imageflow for the very first time only:

`Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("Cannot implicitly convert type 'Newtonsoft.Json.Linq.JValue' to 'string'. An explicit conversion exists (are you missing a cast?)") Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("Cannot implicitly convert type 'Newtonsoft.Json.Linq.JValue' to 'string'. An explicit conversion exists (are you missing a cast?)")

Exception caught: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("'Newtonsoft.Json.Linq.JObject' does not contain a definition for 'name'") Exception caught: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll ("'Newtonsoft.Json.Linq.JObject' does not contain a definition for 'name'")`

Has anyone else come across this problem?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow-dotnet/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH34CDUTPCWOMMGCGB3TQEOD3ANCNFSM45YPFGTA .

paulflo150 commented 3 years ago

@lilith I have migrated all of my applications to System.Text.Json, but it looks like Imageflow pulled Newtonsoft version 12.0.1.22727.

lilith commented 2 years ago

I think this is now resolved (we needed Microsoft.CSharp to be present in later Newtonsoft versions). I'm open to moving to System.Text.Json if it can do the same dynamic object stuff - I haven't dug into it recently.