Skip to content

Commit ca9e837

Browse files
committed
Need to add content type to dylib for nupkg file format to see it
1 parent b0f7386 commit ca9e837

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

build/_custom-goals.shade

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,23 @@ use namespace="System.Net"
1818
archive.CreateEntryFromFile(
1919
"src/Microsoft.AspNet.Server.Kestrel/native/darwin/universal/libuv.dylib",
2020
"native/darwin/universal/libuv.dylib");
21+
22+
XDocument doc;
23+
var entry = archive.GetEntry("[Content_Types].xml");
24+
using (var stream = entry.Open())
25+
{
26+
doc = XDocument.Load(stream);
27+
}
28+
doc.Root.Add(
29+
new XElement(
30+
XName.Get("Default", "http://schemas.openxmlformats.org/package/2006/content-types"),
31+
new XAttribute("Extension", "dylib"),
32+
new XAttribute("ContentType", "application/octet")
33+
));
34+
using (var stream = entry.Open())
35+
{
36+
doc.Save(stream);
37+
}
38+
2139
archive.Dispose();
2240
}

0 commit comments

Comments
 (0)