Skip to content

Commit d0ef9e3

Browse files
authored
[build] Use explicit netstandard2.0 protobuf ref (#989)
Updates Xamarin.Android.Tools.Bytecode to always use the netstandard2.0 version of `protobuf-net`, as this is the version that ships in Xamarin Android. The TargetFramework of java-source-utils has also been updated to adjust the output path of this project when building from Xamarin.Android.
1 parent 1bab47d commit d0ef9e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Xamarin.Android.Tools.Bytecode/Xamarin.Android.Tools.Bytecode.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="protobuf-net" />
21+
<!-- Always reference the netstandard2.0 version of protobuf-net as it is a shared dependency. -->
22+
<PackageReference Include="protobuf-net" ExcludeAssets="Compile" GeneratePathProperty="true" />
23+
<Reference Include="protobuf-net">
24+
<HintPath>$(PkgProtobuf-net)\lib\netstandard2.0\protobuf-net.dll</HintPath>
25+
</Reference>
2226
</ItemGroup>
2327

2428
</Project>

tools/java-source-utils/java-source-utils.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
<Project Sdk="Microsoft.Build.NoTargets">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472</TargetFrameworks>
4+
<TargetFrameworks>$(DotNetTargetFramework)</TargetFrameworks>
55
<OutputPath>$(UtilityOutputFullPath)</OutputPath>
66
</PropertyGroup>
77

8-
<ItemGroup>
9-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
10-
</ItemGroup>
11-
128
<ItemGroup>
139
<CompileJava Include="src\main\**\*.java" />
1410
</ItemGroup>

0 commit comments

Comments
 (0)