Skip to content

Support SixLabors.ImageSharp V3+ on .NET8#72

Open
HakanL wants to merge 1 commit intoOpenMacroBoard:mainfrom
HakanL:main
Open

Support SixLabors.ImageSharp V3+ on .NET8#72
HakanL wants to merge 1 commit intoOpenMacroBoard:mainfrom
HakanL:main

Conversation

@HakanL
Copy link

@HakanL HakanL commented Jan 13, 2026

Added conditional include to support both v2 and v3 depending on the target framework

@HakanL HakanL mentioned this pull request Jan 13, 2026
@HakanL
Copy link
Author

HakanL commented Mar 5, 2026

@wischi-chr Do you think you can review and hopefully merge this PR? It would be nice to be able to use the newer versions of the dependencies.

@wischi-chr
Copy link
Member

Hi @HakanL

Thanks for your PR. Sadly I haven't had the time yet to check out the code and try it and I want to avoid merging code I haven't tested personally.

Things that immediately caught my attention is that ImageSharp v3 changed quite a bit and with this PR (+ the PR in the OpenMacroBoard.SDK) updates the dependency conditionally on the .NET version but no image code changed - are ImageSharp v2 and v3 so similar on a source level?

I also don't really get the added null-check in the SDK-PR. If that value is null, it would probably throw an exception anyway a few lines later, so either the behavior should be fix so the value can't be null, or the null-value should be handled gracefully. The stream looks like it's coming from an embedded resource, so how could that be null anyway? Probably adding a unit-test to check the image is indeed embedded would probably be better.

Also merging alone wouldn't do much for most consumers of this library, because sadly I haven't had time yet to set up an automatic build pipeline for this library, so just merging it won't update the nuget packages.

@HakanL
Copy link
Author

HakanL commented Mar 9, 2026

Hi @wischi-chr no worries, but it would great to get support for this out as I have to use a private build at the moment.
You are correct that there are actually no API changes in ImageSharp upgrade in the methods you're using, I'm building and running this successfully with v3.
I got a new warning when building the SDK, that's why I added the null check. Granted, it's not likely to happen, but the warning was there so I figured it doesn't hurt to add an extra check.

I managed several Open Source projects (for example https://github.com/HakanL/Haukcode.sACN and https://github.com/HakanL/WkHtmlToPdf-DotNet) where I've set up the Github Actions to build and publish to Nuget automatically. Let me know if you need help, I'm happy to set it up for you (you'll add the nuget api key so no need for you to share anything sensitive).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants