Closed DjeeBay closed 1 year ago
Hello @DjeeBay,
We have resolved this issue. It would depend on what version of ImageSharp you are using?
Also, what version of .NET?
Thanks for the answer.
I'm not referencing directly ImageSharp. It is downloaded as a dependency of IronSoftware.System.Drawing and it is in v.2.1.3.
The project is a netstandard 2.0.
If I add manually a dependency to ImageSharp 3.x I have errors indicating that the namespace SixLabors.ImageSharp does not exist.
Can it be that some parts of the solution or a consuming project is targeted at .net6 or higher?
Exception you are getting happens when the code of IronDrawing that was compiled for targets >= .net 6 is then calling SixLabors.ImageSharp 2.1.3. This can happen, if your netstandard 2.0 class library is then consumed by the project targeted at .net6 or higher.
If that is the case you can make your netstandard 2.0 project target netstandard 2.0 and .net 6.0, that way the correct SixLabors.ImageSharp version will be copied to the build output folder from nuget package.
Hope this helps! Let us know if it isn't!
Indeed, multi-targeting was the key to resolve the issue.
Many thanks !
Updating from 2023.3.3 to 2023.4.4 or 2023.6.1 is throwing a method not found exception when using Image.Load((byte[])data)
Is there a knowing issue about that ? It's weird because the project compiles well and the exception is thrown before hitting the breakpoint on the Image.load line.