You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert "[build] Use GitInfo to generate $(Version) (#865)" (#874)
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
0 commit comments