Revert "[build] Use GitInfo to generate $(Version) (#865)"#874
Merged
jonpryor merged 1 commit intodotnet:mainfrom Aug 26, 2021
Merged
Revert "[build] Use GitInfo to generate $(Version) (#865)"#874jonpryor merged 1 commit intodotnet:mainfrom
jonpryor merged 1 commit intodotnet:mainfrom
Conversation
This reverts commit d16b1e5.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This reverts commit d16b1e5.