The new System.IO.Packaging is based on the System.IO.Compression namespace, and a constraint of System.IO.Compression is that you can’t open a file in the zip package more than once for writing. This makes sense – what would the behavior be if a file is opened more than once for writing? It would be pretty random.
If you are seeing this in code that is based on the Open-Xml-PowerTools, then you will need to upgrade to the latest. I have fixed all such issues in Open-Xml-PowerTools.
If you are seeing this in code that you wrote, then you will need to find out why you are opening a part for writing more than once, and then change your code so that you don’t do this. In most cases, you might be opening a part for writing where you actually didn’t need to do so – in one location in your code, you might be opening the document for writing, where you don’t actually change the markup, whereas in another area of your code, you will be writing to the part. In this case, change your code so that you are opening for writing only when you actually need to do so.
I hope this made sense to you. This is the gist, and it is a hard limitation with System.IO.Compression, so the issue must be fixed.