Open-XML-SDK
Open-XML-SDK copied to clipboard
Method not found w/ System.IO.Packaging version 7.0.0
Describe the bug Having an error when using with System.IO.Packaging 7.0.0
System.MissingMethodException
HResult=0x80131513
Message=Método não encontrado: 'System.IO.Packaging.PackageProperties DocumentFormat.OpenXml.Packaging.OpenXmlPackage.get_PackageProperties()'.
Downgraded to System.IO.Packaging 6.0.0 and works as spected
Screenshots If applicable, add screenshots to help explain your problem.
To Reproduce On init the var
var wb = new XLWorkbook(file.InputStream);
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Observed behavior A clear and concise description of what you expected to happen.
Expected behavior Import the XLS from inputstream
Desktop (please complete the following information):
- OS: W11
- Office version: NA
- .NET Target: .NET Framework 4.6.1
- DocumentFormat.OpenXml Version: 2.20.0 w/ System.IO.Packaging 7.0.0
Additional context Add any other context about the problem here.
6.0->7.0 is a major change, so this kind of thing may happen.
FYI v3.0 of the SDK is under development and has a beta out on NuGet. That supports v7.0 of System.IO.Packaging
Also, I see you're using .NET Framework - the System.IO.Packaging won't do anything there. Suprised that it's broken, though
On .NET Framework, the System.IO.Packaging library is purely a reference assembly that type forwards to the inbox WindowsBase. If you need functionality from System.IO.Packaging, you'll need to run on .NET 6+
v6.0.0 of System.IO.Packaging supports 4.6.1, but v7.0.0 looks like it only supports 4.6.2+
Can you provide a sample of the error you're seeing?