Reputation: 35
I'm creating dll containg chart, to send data to control I'm using JSON format. I added NuGet package System.Text.Json And I can compile it and test on this functionality pass.
However, after I use it in aplication (SCADA system with VBA underneath) I got error:
Could not load file or assembly ‘System.Buffers, Version=4.0.2.0, Culture, neutral, PublicKeyToken=cc7b13ffcd2ddd51’, or one of its dependencies. System cannot find the file specified.
I noticed that System.Buffers is not visible in Dependencies, but it's adden in file app.config in my project. After compile System.Buffer.dll appears in output folder so I copied it to target aplication too.
I found some topics about Binding Redirection causing similar problem, but could solve it.
Upvotes: 3
Views: 10859
Reputation: 2683
I'm building a Windows Forms app with a .Net Standard 2.0 class library. For me, adding the System.Text.Json
Nuget to the Windows Forms app as well as to the class library fixed the issue
Upvotes: 1