Skip to content

[build] Build Xamarin.Android.NUniteLite against v2.3 #553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

jonpryor
Copy link
Member

@jonpryor jonpryor commented Apr 7, 2017

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.

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.
@jonpryor jonpryor force-pushed the jonp-nunit-api-10 branch from 7b5c3cb to 84b8311 Compare April 7, 2017 18:49
@jonpryor jonpryor merged commit ac0d65c into dotnet:master Apr 7, 2017
jonpryor added a commit that referenced this pull request Apr 10, 2017
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.
jonpryor added a commit that referenced this pull request Jan 8, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants