Skip to content

Commit 90bb172

Browse files
DmitryLukyanovJamesKovacs
authored andcommitted
CSHARP-3178: MongoDB.Driver latest version 2.11 breaks compiling Xamarin iOS.
1 parent 288c7bf commit 90bb172

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/MongoDB.Driver.Core/MongoDB.Driver.Core.csproj

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>netstandard1.5;netstandard2.0;net452</TargetFrameworks>
@@ -25,6 +25,18 @@
2525
<IncludeSymbols>true</IncludeSymbols>
2626
</PropertyGroup>
2727

28+
<PropertyGroup>
29+
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
30+
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
31+
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
32+
</PropertyGroup>
33+
34+
<Target Name="PrintOS" BeforeTargets="Build">
35+
<Message Text="IsWindows: '$(IsWindows)'" Importance="high" />
36+
<Message Text="IsOSX: '$(IsOSX)'" Importance="high" />
37+
<Message Text="IsLinux: '$(IsLinux)'" Importance="high" />
38+
</Target>
39+
2840
<PropertyGroup Condition="'$(Version)'==''">
2941
<Version>0.0.0-local</Version>
3042
</PropertyGroup>
@@ -61,7 +73,7 @@
6173
<SnappyBinaries>Core/Compression/Snappy/lib/win</SnappyBinaries>
6274
</PropertyGroup>
6375

64-
<ItemGroup>
76+
<ItemGroup Condition=" '$(IsWindows)' == true ">
6577
<Content Include="$(SnappyBinaries)/snappy32.dll">
6678
<Pack>true</Pack>
6779
<PackagePath>$(CompressionRuntimesPath)</PackagePath>
@@ -72,7 +84,7 @@
7284
</Content>
7385
</ItemGroup>
7486

75-
<ItemGroup>
87+
<ItemGroup Condition=" '$(IsWindows)' == true ">
7688
<Content Include="$(SnappyBinaries)/snappy32.dll">
7789
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7890
<Link>snappy32.dll</Link>
@@ -92,14 +104,14 @@
92104
<ZstdBinaries>Core/Compression/Zstandard/lib/win</ZstdBinaries>
93105
</PropertyGroup>
94106

95-
<ItemGroup>
107+
<ItemGroup Condition=" '$(IsWindows)' == true ">
96108
<Content Include="$(ZstdBinaries)/libzstd.dll">
97109
<Pack>true</Pack>
98110
<PackagePath>$(CompressionRuntimesPath)</PackagePath>
99111
</Content>
100112
</ItemGroup>
101113

102-
<ItemGroup>
114+
<ItemGroup Condition=" '$(IsWindows)' == true ">
103115
<Content Include="$(ZstdBinaries)/libzstd.dll">
104116
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
105117
<Link>libzstd.dll</Link>
@@ -150,7 +162,7 @@
150162
<ItemGroup>
151163
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
152164
<None Include="..\..\THIRD-PARTY-NOTICES" Pack="true" PackagePath="\" />
153-
<None Include="..\..\packageIcon.png" Pack="true" PackagePath=""/>
165+
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
154166
</ItemGroup>
155167

156168
</Project>

0 commit comments

Comments
 (0)