npoi
npoi copied to clipboard
SXSSF Workbook Incompatible with SharpZipLib 1.4.2
Hi. We get this error "Method not found: 'Void ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(System.String)" in runtime. We detect our problem fix if we reference to "SharpZipLib 1.3.3" . Do you have any idea to fix it or plan to upgrades "SharpZipLib" package in your codes?
Hi, can you please attach the file causing this exception?
which NPOI version are you using?
Hi, can you please attach the file causing this exception?
Hi my file causing this exception in this repo https://github.com/amirali079/ExcelWriter/tree/main/WriteExcel .
which NPOI version are you using?
I use the last version of NPOI (2.6.1)
Issue is pretty simple, SharpZipLib added an optional argument to the constructor that is being used at NPOI.XSSF.Streaming.SXSSFWorkbook.InjectData
, rebuilding it with a higher version selected should solve it.
Wow, but it is marked as optional
https://github.com/icsharpcode/SharpZipLib/blob/0ef794188009c17465e6444d9cf9fffd36eae6e7/src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs#L402
If it's really the issue it seems to be a breaking change in SharpZipLib and instead of creating a new optional parameter it'll be better to create 2 separate constructors
Yes, so basically it's a nonissue if You'd constrain dependency to exact version 1.3.3, as that prevents binary incompatibility from anyone upgrading transitional dependencies. Building & publishing the library with the higher version of the reference would also solve the issue, but obviously more issues might arise if SharpZipLib would introduce more breaking changes & upgradability is still possible.
Yes, so basically it's a nonissue if You'd constrain dependency to exact version 1.3.3, as that prevents binary incompatibility from anyone upgrading transitional dependencies. Building & publishing the library with the higher version of the reference would also solve the issue, but obviously more issues might arise if SharpZipLib would introduce more breaking changes & upgradability is still possible.
Thanks, I've created a bug report in SharpZipLib https://github.com/icsharpcode/SharpZipLib/issues/839
Let's pend the new release of SharpZipLib