Skip to content

Commit 7b5c3cb

Browse files
committed
[build] Build Xamarin.Android.NUniteLite against v2.3
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=54785 The scenario: build `Xamarin.Android.NUnitLite.dll` against API-Y, use it in an app using `Mono.Android.dll` API-X, X < Y. (Specifically, build `Xamarin.Android.NUnitLite.dll` against API-19, and the app against API-10.) If you build this in a Release configuration, or otherwise attempt to link the assemblies, Linking will fail: error XA2006: Could not resolve reference to 'System.String Android.OS.Environment::get_DirectoryDocuments()' (defined in assembly 'Xamarin.Android.NUnitLite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065') with scope 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. Commit 3ed220d fixed a similar issue wrt `BaseBundle`, but only lowered `Y` to `19`. Since we still support Apps targeting API-10, this is still problematic. Update the `make framework-assemblies` target so that instead of hardcoding the `Xamarin.Android.NUnitLite.dll` "rebuild" to use API-19, instead use `$(firstword $(API_LEVELS))` -- which is currently API-10/v2.3 -- so that as we "bump" up our minimum supported API level we can progressively include API features.
1 parent 6123cca commit 7b5c3cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools/scripts/BuildEverything.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ framework-assemblies:
105105
done
106106
$(foreach conf, $(CONFIGURATIONS), \
107107
rm -f bin/$(conf)/lib/xbuild-frameworks/MonoAndroid/v1.0/Xamarin.Android.NUnitLite.dll; \
108-
$(MSBUILD) $(MSBUILD_FLAGS) src/Xamarin.Android.NUnitLite/Xamarin.Android.NUnitLite.csproj /p:Configuration=$(conf) $(_MSBUILD_ARGS) /p:AndroidApiLevel=19 /p:AndroidFrameworkVersion=v4.4; )
108+
$(MSBUILD) $(MSBUILD_FLAGS) src/Xamarin.Android.NUnitLite/Xamarin.Android.NUnitLite.csproj /p:Configuration=$(conf) $(_MSBUILD_ARGS) /p:AndroidApiLevel=$(firstword $(API_LEVELS) /p:AndroidFrameworkVersion=$(firstword $(FRAMEWORKS)); )
109109

110110
runtime-libraries:
111111
$(foreach conf, $(CONFIGURATIONS), \

0 commit comments

Comments
 (0)