[binary-reference-assemblies] Add a symlink from 4.0/mscorlib.dll to 4.0-api/mscorlib.dll
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 3 Feb 2016 18:45:25 +0000 (19:45 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 3 Feb 2016 18:45:25 +0000 (19:45 +0100)
Some programs like NUnit check if a file exists there and break otherwise.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38331

mcs/class/reference-assemblies/Makefile

index a62ffd40758675af26ce490a1b671279ff953ce5..60d4cbd3f1831d9c7034550a0b68a1048adcdff2 100644 (file)
@@ -18,6 +18,12 @@ install-local:
        $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/*.dll $(PROFILE_DIR)/4.5-api
        $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll $(PROFILE_DIR)/4.5-api/Facades
 
+       # Unfortunately, a few programs (most notably NUnit) have hardcoded checks for <prefix>/lib/mono/4.0/mscorlib.dll,
+       # so we need to place something there or those tools break. We decided to symlink to the reference assembly for now.
+       # See https://bugzilla.xamarin.com/show_bug.cgi?id=38331
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0
+       ln -sf ../4.0-api/mscorlib.dll $(PROFILE_DIR)/4.0/mscorlib.dll
+
 DISTFILES = $(wildcard ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v4.5/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v4.0/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v3.5/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v2.0/*.dll) Makefile
 
 dist-local: dist-default