From ca9e8370480d650aa8be797f0f699ad9bd23c7de Mon Sep 17 00:00:00 2001 From: Louis DeJardin Date: Mon, 7 Jul 2014 15:07:28 -0700 Subject: [PATCH] Need to add content type to dylib for nupkg file format to see it --- build/_custom-goals.shade | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/build/_custom-goals.shade b/build/_custom-goals.shade index be70db8ae0..78e64e8b7d 100644 --- a/build/_custom-goals.shade +++ b/build/_custom-goals.shade @@ -18,5 +18,23 @@ use namespace="System.Net" archive.CreateEntryFromFile( "src/Microsoft.AspNet.Server.Kestrel/native/darwin/universal/libuv.dylib", "native/darwin/universal/libuv.dylib"); + + XDocument doc; + var entry = archive.GetEntry("[Content_Types].xml"); + using (var stream = entry.Open()) + { + doc = XDocument.Load(stream); + } + doc.Root.Add( + new XElement( + XName.Get("Default", "http://schemas.openxmlformats.org/package/2006/content-types"), + new XAttribute("Extension", "dylib"), + new XAttribute("ContentType", "application/octet") + )); + using (var stream = entry.Open()) + { + doc.Save(stream); + } + archive.Dispose(); }