views:

25

answers:

1

Is it possible to create a System.IO.Packaging.Package on a memory stream. I'd like to avoid the file system and do everything in memory if possible.

However, the only way to create a Package is to call Package.Open which accepts a stream. However, if the stream is empty, this fails.

Any clue?

+2  A: 

This works:

Stream memStream = new MemoryStream();
Package pack = Package.Open(memStream, FileMode.Create);
Matthew Flaschen