Questions tagged [system.io.packaging]

system.io.packaging is Microsoft's system for creating and packaging complex multi-part documents. It is used by Microsoft Office for common formats like xlsx and docx, among others.

System.IO.Packaging is Microsoft's system for creating and packaging complex multi-part documents. It is used by Microsoft Office for common formats like xlsx and docx, among others.

The Package format is essentially a ZIPped folder with the document contents, the Parts, normally placed in subfolders in the ZIP. You can examine a Package by renaming it .zip and opening it, for instance, an xlsx file.

System.IO.Packaging can also be used as a basic ZIP library, but it will insist on adding a file at the root called [Content Types].xml.

42 questions
118
votes
8 answers

System.IO.Packaging

I have my project set to .NET Framework 4.0. When I add System.IO.Packaging, it says that it doesn't exist. It also doesn't show up when I try to add it as a reference to the project. How can I add System.IO.Packaging to my C# project?
Drake
  • 3,851
  • 8
  • 39
  • 48
49
votes
6 answers

Extracting files from a Zip archive programmatically using C# and System.IO.Packaging

I have a bunch of ZIP files that are in desperate need of some hierarchical reorganization and extraction. What I can do, currently, is create the directory structure and move the zip files to the proper location. The mystic cheese that I am…
Craig
  • 11,614
  • 13
  • 44
  • 62
21
votes
3 answers

Create a Stream without having a physical file to create from

I'm needing to create a zip file containing documents that exist on the server. I am using the .Net Package class to do so, and to create a new Package (which is the zip file) I have to have either a path to a physical file or a stream. I am trying…
jhorton
  • 1,019
  • 3
  • 17
  • 36
8
votes
3 answers

Package.Open Requested registry access is not allowed

We are calling System.IO.Packaging.Package.Open() in an ASP.NET application. Further, a Windows impersonation has been performed before calling this because the package to be opened is stored in a secure location and the impersonation is required…
Mont
  • 301
  • 3
  • 10
7
votes
2 answers

Tutorials on Open Packaging Conventions / System.IO.Packaging

Has anyone seen a good tutorial on Open Packaging Conventions and the System.IO.Packaging namespace? I have some areas where I think this technology could be useful, but I'm nervous because I don't quite understand it and I'm stuck on some of the…
Doug McClean
  • 14,265
  • 6
  • 48
  • 70
5
votes
2 answers

Creating zip in c# with System.IO.Packaging

I am trying to create zip file dynamically on the server that includes photos from online services. But when I try to open the file, WinRar sais the the file is unknown format or damaged. this is the code: MemoryStream stream = new…
aikixd
  • 506
  • 5
  • 16
5
votes
0 answers

Store must be open for this operation - System.IO.Packaging.Package

I am making use of the System.IO.Packaing.Package class to zip files. It is possible to have multiple instances of my application running at the same time with files being read and saved. When working with small files all seems fine, however when…
Thulani Chivandikwa
  • 3,402
  • 30
  • 33
5
votes
1 answer

Using IsolatedStorage on a IIS server

I'am a bit confused about the use of Isolated Storage on a IIS server. I understand the goal of Isolated Storage : provides a safe place to store data with no worry about how and where is this place. Since Isolated Storage have a by-user and…
JoeBilly
  • 3,057
  • 29
  • 35
4
votes
2 answers

C# Getting a list of names of the webcams

I have searched for several days to no avail. I am trying to simply list to a text file the Image Device Names i.e. webcams using c#. I know I can use System.IO.Ports to get comports, which I am doing, but I cannot find a simple way to list the…
Brad Jarrett
  • 109
  • 3
  • 11
4
votes
1 answer

Unable to determine the identity of domain using System.IO.Packaging

I am getting "Unable to determine the identity of domain" when using System.IO.Packaging through COM Interop, there are a few articles describing why this is happening and the solution is to run the offending function in its own AppDomain. So I took…
user1371314
  • 762
  • 7
  • 24
2
votes
1 answer

How to fix 'Could not load file or assembly System.IO.Packaging, Version=4.0.3.0' in a .net standard 2.0 project

I am trying to process a word document. For that, I installed the DocumentFormat.OpenXml NuGet package. It installed following dependencies: DocumentFormat.OpenXml System.IO.Packaging (4.5.0) System.Runtime.Serialization As soon as it hit the…
2
votes
0 answers

openxml .net 4.5 lib with .net core 2.2

I am receiving a System.Io.FileNotFoundException with the assembly System.IO.Packaging when trying to use my .Net 4.6.1 Library that was working fine with my ConsoleApp. I am trying to use this same library with a c#.Net core 2.2 Console…
2
votes
1 answer

Opening a System.IO.Packaging.Package from a non-seekable Stream

I am trying to unpack a System.IO.Packaging.Package that I received from a web server. That is, I am using the System.IO.Packaging.Package.Open(Stream) method and passing it the response stream of a System.Net.HttpWebResponse. Unfortunately, this…
PoByBolek
  • 3,775
  • 3
  • 21
  • 22
2
votes
1 answer

How to decompress/unarchive files compressed/archived using various techniques - zip, rar, gzip, tar

A requirement for a system I am writing means that I need to determine the contents of files/packages that may have been created using any one of a number of different compression/archive techniques - zip, gzip, rar, tar. The files will be located…
JeffR
  • 828
  • 1
  • 13
  • 22
2
votes
1 answer

Android error: Error generating final archive: java.io.FileNotFoundException:

I have been having this problem on Eclipse lately. Whenever I build a project, this error comes up: Android error: Error generating final archive: java.io.FileNotFoundException: C:\Users\me\workspace\project\bin\resources.ap_ does not exist …
1
2 3