Skip to content

Commit ed9c2ab

Browse files
authored
[Java.Interop-MonoAndroid] Set Version after Directory.Build.props (#965)
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.
1 parent 05bfece commit ed9c2ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Java.Interop/Java.Interop-MonoAndroid.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
<LangVersion>8.0</LangVersion>
1818
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
1919
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
20-
<Version>0.1.0.0</Version>
2120
</PropertyGroup>
2221
<Import Project="..\..\Directory.Build.props" />
2322
<PropertyGroup>
23+
<Version>0.1.0.0</Version>
2424
<XAConfigPath>..\..\bin\Build$(Configuration)\XAConfig.props</XAConfigPath>
2525
</PropertyGroup>
2626
<Import Condition="Exists ('$(XAConfigPath)')" Project="$(XAConfigPath)" />
@@ -114,4 +114,4 @@
114114
<None Include="Documentation\Java.Interop\JniManagedPeerStates.xml" />
115115
<None Include="Documentation\Java.Interop\JniEnvironment.References.xml" />
116116
</ItemGroup>
117-
</Project>
117+
</Project>

0 commit comments

Comments
 (0)