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
[build] Use GitInfo to Generate Version information. (#875)
Context: d16b1e5
Context: b7982e4
Our previous attempt to use the [`GitInfo`][0] [NuGet Package][1] to
generate Version information in commit d16b1e5 did not go as planned.
It turns out that old-style projects do NOT support the
`$(GenerateAssemblyInfo)` MSBuild property. As such the version
information is never generated. As a result when we built the
Xamarin.Android version of `Java.Interop` it never includes version
information, which results in errors such as:
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'
Additionally, we were generating the version data on EVERY build.
It could be optimized by only generating the required data on the
first build, or in this case the `make prepare` step.
Introduce a system where a `Version.props` file gets generated during
the `make prepare` step and then that file is imported into all the
sub-projects. We also have a system to make sure that for legacy
projects the `$(GenerateAssemblyInfo)` property actually works.
[0]: https://github.com/devlooped/GitInfo
[1]: https://www.nuget.org/packages/GitInfo/2.1.2
0 commit comments