koszeggy / KGySoft.Drawing

KGy SOFT Drawing is a library for advanced image, icon and graphics handling.
https://kgysoft.net/drawing
Other
58 stars 8 forks source link

Can't update to System.Drawing.Common version 6.0.0 #12

Closed davidei1955 closed 2 years ago

davidei1955 commented 2 years ago

When I try to upgrade the System.Drawing.Common package from version 5.0.3 to 6.0.0, it says it's incompatible with KGySoft.Drawing version 6.3.2.0 . Reading the MS doco for the new System.Drawing.Common package implies that it is now 'Windows Only' and no longer cross platform.

My usage of KGySoft.Drawing and System.Drawing.Common IS 'Windows Only'. Is it possible to use them together in a 'Windows Only' app? My app currently uses .NET Framework 4.8 but will soon be migrated to .NET 6.0.

FWIW, I downloaded the KGySoft.Drawing source code and am compiling it into my app ( to make it easier to step through the code in the debugger). I haven't modifed the code or .csproj file.

koszeggy commented 2 years ago

When I try to upgrade the System.Drawing.Common package from version 5.0.3 to 6.0.0, it says it's incompatible with KGySoft.Drawing version 6.3.2.0

What platform(s) do you target in your project? To be able to reference System.Drawing.Common 6.0,0 you need to target at least .NET 5 (see the dependecies page of the package). It's because Microsoft removed the older platforms support from their 6.0.0 version saying they are already out of support. As this may create a dll hell if you target multiple targets from your project I opened an issue but they closed it without fixing the problem.

It means that if you target multiple platforms you are now forced to use conditions in your .csproj file to reference always the correct version of System.Drawing.Common. See the KGySoft.Drawing.csproj itself.

Btw, if you are upgrading versions I encourage you to upgrade to KGySoft.Drawing 7.0.0-preview.2 because it contains some breaking changes that you should resolve later anyway. And it already contains the CMYK support you requested.

davidei1955 commented 2 years ago

I missed that S.D.Common 6.0 requires .NET 6.0. My app currently targets .NET Framework 4.8 but will soon be migrated to .NET 6.0 . I'll upgrade System.Drawing.Common when I migrate. I usually avoid 'preview' versions, but I'll upgrade to KGySoft.Drawing 7.0.0-preview.2 if you think it's reasonably stable. Thanks for the quick response.