Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit a87739b

Browse files
committed
Temp Workaround: System.IO.Compression fix
There is a bug in Mono's System.IO.Compression which causes ZipArchive to produce an incorrect .zip file. This results in corrupt .nupkg files which do not properly install in the IDE. Until the mono bug is fixed, this workaround is needed to build valid .nupkg files
1 parent 1428e59 commit a87739b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ TOOLS_DIR=$SCRIPT_DIR/tools
1010
NUGET_EXE=$TOOLS_DIR/nuget.exe
1111
CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
1212

13+
# BEGIN TEMP WORKAROUND
14+
SYSIOCOMP=$TOOLS_DIR/System.IO.Compression.dll
15+
# END TEMP WORKAROUND
16+
1317
# Define default arguments.
1418
SCRIPT="build.cake"
1519
TARGET="Default"
@@ -69,6 +73,20 @@ if [ $? -ne 0 ]; then
6973
fi
7074
popd >/dev/null
7175

76+
# BEGIN TEMP WORKAROUND
77+
# There is a bug in Mono's System.IO.Compression
78+
# This binary fixes the bug for now
79+
# Download System.IO.Compression if it does not exist.
80+
if [ ! -f "$SYSIOCOMP" ]; then
81+
echo "Downloading System.IO.Compression.dll ..."
82+
curl -Lsfo "$SYSIOCOMP" http://xamarin-components-binaries.s3.amazonaws.com/System.IO.Compression.dll
83+
if [ $? -ne 0 ]; then
84+
echo "An error occured while downloading System.IO.Compression.dll."
85+
exit 1
86+
fi
87+
fi
88+
# END TEMP WORKAROUND
89+
7290
# Make sure that Cake has been installed.
7391
if [ ! -f "$CAKE_EXE" ]; then
7492
echo "Could not find Cake.exe at '$CAKE_EXE'."

0 commit comments

Comments
 (0)