You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since OpenXml is based on System.IO.Packaging and there is no support for Flush()/Save() in .NET Core (dotnet 5, ...), I wanted to ask whether OpenXml is planning a better alternative than closing (disposing) the whole OpenXmlPackage (e.g. WordprocessingDocument)?
/// <summary>/// Gets a value indicating whether saving the package is supported by calling <see cref="Save"/>. Some platforms (such as .NET Core), have limited support for saving./// If <c>false</c>, in order to save, the document and/or package needs to be fully closed and disposed and then reopened./// </summary>
#if FEATURE_PACKAGE_FLUSH
publicstaticboolCanSave{ get;}= true;
#elsepublicstaticboolCanSave{ get;}
#endif
The text was updated successfully, but these errors were encountered:
mhoerandner
changed the title
No support of System.IO.Packaging.Package.Save()/Flush() in .NET CoreFeature request for Open XML SDK
No support of System.IO.Packaging.Package.Save()/Flush() in .NET Core
Sep 29, 2022
I've replaced the underlying abstraction with our own that we can have much more control over. In the end, we still rely on the System.IO.Packaging.Package APIs, but can now "Reload" the underlying package which will allow this to be enabled.
Once this is merged in, please give it a try and see if it works better for you.
I'm not sure when the underlying issue will be fixed... so fixing it on our side instead. Once it works there, we can remove this work around, but this will allow us to move forward with the expected behavior.
Since OpenXml is based on System.IO.Packaging and there is no support for
Flush()
/Save()
in .NET Core (dotnet 5, ...), I wanted to ask whether OpenXml is planning a better alternative than closing (disposing) the wholeOpenXmlPackage
(e.g. WordprocessingDocument)?The text was updated successfully, but these errors were encountered: