[build] Build Mono.Android.Export.dll for the *minimum* API level #581
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Build-time assembly resolution is...complicated, but to summarize
greatly, when
<Reference Include="Mono.Android.Export" />isresolved, the following locations are checked:
The
...included framework versions...list is controlled by theRedistList/FrameworkList.xmlfiles and their/FileList/@IncludeFrameworkattribute value. For example,bin/Debug/lib/xbuild-frameworks/MonoAndroid/v7.1/RedistList/FrameworkList.xmlmay have a value of
v7.0for theIncludeFrameworkattribute.Checking
/FileList/@IncludeFrameworkis done "recursively", and ifyou have a build environment created by
make jenkins, this will"chain" through every supported framework version.
Thus, if
$(TargetFrameworkVersion)isv6.0, then the followingdirectories may be checked to resolve
Mono.Android.Export.dll:The first match is used.
Which presents a bit of a problem for e.g.
Build #373's
oss-xamarin.android*.zipfile, which is a buildtree prior to this change: It places
Mono.Android.Export.dllintothe
$(AndroidLatestFrameworkVersion)directory:This is problematic because if the app's
$(TargetFrameworkVersion)value is lower than
v7.1, thenMono.Android.Export.dllcannot be resolved:
...ouch. :-(
The correct fix is to update the
make framework-assembliestarget tobuild
Mono.Android.Export.csprojinto the lowest supportedAPI-level,
$(firstword $(API_LEVELS)). This would change the contentsof the above
oss-xamarin.android*.zipfile to instead contain:Since API-10 (v2.3) is the lowest supported API level, this allows
Mono.Android.Export.dllto be used in all supported frameworkversions.
"While we're at it," remove the
make task-assembliesandmake runtime-librariestargets, as these were redundent with -- andran the same commands as -- the
make leeroy-alltarget.