Why Exclude specific paths?

Topics: Ecosystem
Mar 22, 2014 at 10:54 PM
It seems like the nuget Core ZipPackage class is excluding certain folder names from being used by packages for no real reason.
        // paths to exclude
        private static readonly string[] ExcludePaths = new[] { "_rels", "package" }
As far as I can tell, the only reason for excluding "package" as a folder is that when you're unpacking the file you don't bother looking at relationships, so you're just unpacking EVERYTHING ... almost as if it were just a zip file.

The files that are added by System.IO.Packaging have specific relationship URIs (e.g. http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties), and it seems to me that all you had to do is ... not unpack those specific files. Wouldn't that be better?

In fact, you could add relationship information to each file when you're creating the package -- even including the bitness/frameworks information -- and then you would be able to only unpack the files you need, without having to arbitrarily exclude "package"
You should fix this: put a relationship in for every file (even if it's just something like