Open adamjhilton opened 1 month ago
Removing OpenXmlPackage.Close()
was listed as a breaking change in the release notes for v3 - ref https://github.com/dotnet/Open-XML-SDK/issues/1298 / https://github.com/dotnet/Open-XML-SDK/pull/1373
Ah... So, the author of the DocumentBuilder class in the OpenXmlPowerTools assembly hasn't removed the call to OpenXmlPackage.Close() yet? Got it. Hopefully, they'll update it eventually.
Have you resolved that? I still have that error and couldn't remove OpenXmlPackage.Close(), because the method DocumentBuilder.BuildDocument has that error.
Describe the bug I updated my NuGet packages and now I'm getting this error:
System.MissingMethodException: 'Method not found: 'Void DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Close()'.'
Current versions:
The stack trace leaves my code here:
Looking at the decompiled assembly, there is a call to the [missing] OpenXmlPackage.Close() method:
Here's the header from the decompiled assembly:
I did notice that the version of the .DLL doesn't match the version of the NuGet package. I'm not sure if this is a problem or not. I don't think it is as the publish date matches.![image](https://github.com/user-attachments/assets/13997a51-009e-4ccf-a82c-aedf596aa379)
Solution Reverting to DocumentFormat.OpenXml v2.20.0 resolves the issue. Although, I don't think I'd classify this as a "solution". But it works for now.
Desktop (please complete the following information):