Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Mar 22, 2022

We are setting <Version>0.1.0.0</Version> in Java.Interop-MonoAndroid.csproj, which is correct. However immediately after that we <Import Project="..\..\Directory.Build.props" /> which defaults projects to <Version>$(JIUtilityVersion)</Version>.

This commit reorders the .csproj to set the <Version> in the project after the import.

jpobst and others added 3 commits March 22, 2022 14:02
…rops

We are setting `<Version>0.1.0.0</Version>` in `Java.Interop-MonoAndroid.csproj`, which is correct.  However immediately after that we `<Import Project="..\..\Directory.Build.props" />` which defaults projects to `<Version>$(JIUtilityVersion)</Version>`.

This commit reorders the `.csproj` to set the `<Version>` in the project *after* the import.
@jonpryor jonpryor merged commit ed9c2ab into main Mar 22, 2022
@jonpryor jonpryor deleted the jpobst-patch-1 branch March 22, 2022 19:50
jonpryor pushed a commit that referenced this pull request Mar 22, 2022
)

Context: https://discord.com/channels/732297728826277939/732297837953679412/955531846865784882
Context: cbd9666

When trying to update some NuGet packages which were using
Visual Studio 17.3 / Xamarin.Android 12.3.0 preview bits, we
encountered an "oddity": the generated assembly was referencing
Java.Interop.dll, Version=0.2.0.6 (?!).  This was unexpected, as we
wanted Java.Interop.dll to have Version=0.1.0.0; see also 2d5431f.

We are setting `$(Version)`=0.1.0.0 in
`Java.Interop-MonoAndroid.csproj`, which is what we intended.

However, immediately after setting `$(Version)` we do:

	<Import Project="..\..\Directory.Build.props" />

which *overrides* `$(Version)`, setting it to `$(JIUtilityVersion)`;
see commit cbd9666.  This was *unintended*.

Update `Java.Interop-MonoAndroid.csproj` so that `$(Version)` is set
*after* `<Import/>`ing `Directory.Build.props`, so that the
`$(Version)` override is actually *used*.

This should cause Java.Interop.dll within Xamarin.Android to have
Version=0.1.0.0.
@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.

3 participants