Skip to content

Conversation

@dellis1972
Copy link
Contributor

This reverts commit d16b1e5.

@dellis1972 dellis1972 requested a review from jonpryor August 26, 2021 08:25
@jonpryor jonpryor merged commit b7982e4 into dotnet:main Aug 26, 2021
@dellis1972 dellis1972 deleted the revert_gitinfo branch August 26, 2021 12:26
jpobst pushed a commit that referenced this pull request Sep 30, 2021
Context: dotnet/android#6229
Context: dotnet/android#6229 (comment)

This reverts commit d16b1e5.

The problem is `src/Java.Interop/Java.Interop-MonoAndroid.csproj`,
which is [used by the xamarin-android build][0] to create a
"MonoAndroid-profile" assembly (see also 85be94f).  In a d16b1e5
world -- one in which `src/Java.Interop/Properties/AssemblyInfo.cs`
doesn't contain an `[assembly: AssemblyVersion(…)]` custom attribute
-- for reasons not yet known, the `SetVersion` target is never run,
and/or *can't* run, when `Java.Interop-MonoAndroid.csproj` is built:

	% msbuild /v:diag Java.Interop-MonoAndroid.csproj /p:JavaInteropProfile=Net45 \
	    /p:XAInstallPrefix=…/xamarin-android/bin/Debug/lib/xamarin.android  \
	    /p:TargetFrameworkIdentifier=MonoAndroid \
	    /p:TargetFrameworkVersion=v1.0 \
	    /p:TargetFrameworkRootPath=…/xamarin-android/bin/Debug/lib/xamarin.android/xbuild-frameworks

Consequently, the "MonoAndroid-profile" `Java.Interop.dll` winds up
with *no* version set, i.e. version 0.0.0.0, which breaks everything:

	MainActivity.cs(13,3): error CS1705:
	Assembly 'Xamarin.Forms.Platform.Android' with identity 'Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
	uses 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
	which has a higher version than referenced assembly 'Java.Interop' with identity
	'Java.Interop, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'

In the interests of expediency -- we can't bump Java.Interop within
xamarin-android so long as d16b1e5 is in place -- revert commit
d16b1e5 so that we can un-block repo bumps.

We'll try to figure out how to properly use the `GitInfo` NuGet
package while supporting `Java.Interop-MonoAndroid.csproj` later.

[0]: https://github.com/xamarin/xamarin-android/blob/bcc315857f2cd61351ba469973043d91c902c50e/src/Mono.Android/Mono.Android.targets#L10-L35
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 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