Skip to content

Commit 5e26db2

Browse files
committed
Fixing mono issue with System.Net.Http
1 parent da2bb0d commit 5e26db2

6 files changed

Lines changed: 23 additions & 4 deletions

File tree

‎netfx.props‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@
3131
<Reference Include="System.IO" Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND $(TargetFramework.StartsWith('net4'))" />
3232
<Reference Include="System.Threading.Tasks" Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND $(TargetFramework.StartsWith('net4'))" />
3333
<Reference Include="System.Text.Encoding" Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND $(TargetFramework.StartsWith('net4'))" />
34-
<Reference Include="System.Net.Primitives" Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND $(TargetFramework.StartsWith('net4'))" />
3534
</ItemGroup>
3635
</Project>

‎paket.dependencies‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@ source https://api.nuget.org/v3/index.json
22

33
nuget NuGet.CommandLine
44

5+
# This group is needed for packages that are not needed or don't work on Mono.
6+
group NetCoreAndStandard
7+
frameworks: netcoreapp2.0, netstandard2.0
8+
9+
# System.Net.Http is broken on Mono (see https://github.com/dotnet/corefx/issues/19914).
10+
# Mono hijacks its calls to its own version of System.Net.Http, so we should not reference or include the assembly
11+
# in mono releases.
12+
nuget System.Net.Http 4.3.4
13+
514
group Common
615
source https://api.nuget.org/v3/index.json
716
frameworks: net461, netcoreapp2.0, netstandard2.0
817

918
nuget System.Reactive
10-
nuget System.Net.Http 4.3.4
1119

1220
# Be explicit about FSharp.Core 4.3.4 when designing libraries.
1321
# See https://fsharp.github.io/2015/04/18/fsharp-core-notes.html#fsharpcore-entries-in-project-files for additional information.

‎src/FSharp.Data.GraphQL.Client.DesignTime/FSharp.Data.GraphQL.Client.DesignTime.fsproj‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
</None>
4242
<ProjectReference Include="..\FSharp.Data.GraphQL.Shared\FSharp.Data.GraphQL.Shared.fsproj" />
4343
</ItemGroup>
44+
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
45+
<Reference Include="System.Net.Primitives" />
46+
<Reference Include="System.Net.Http" />
47+
</ItemGroup>
4448
<Import Project="..\..\.paket\Paket.Restore.targets" />
4549
</Project>
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
group Common
22
FSharp.Core
3-
System.Net.Http
43
File:ProvidedTypes.fsi
5-
File:ProvidedTypes.fs
4+
File:ProvidedTypes.fs
5+
6+
group NetCoreAndStandard
7+
System.Net.Http

‎src/FSharp.Data.GraphQL.Client/FSharp.Data.GraphQL.Client.fsproj‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
<None Include="FSharp.Data.GraphQL.Client.fsproj.paket.template" />
2727
<None Include="paket.references" />
2828
</ItemGroup>
29+
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
30+
<Reference Include="System.Net.Primitives" />
31+
<Reference Include="System.Net.Http" />
32+
</ItemGroup>
2933
<Target Name="BeforeBuild">
3034
<MSBuild Projects="..\FSharp.Data.GraphQL.Client.DesignTime\FSharp.Data.GraphQL.Client.DesignTime.fsproj" Targets="Restore" />
3135
<MSBuild Projects="..\FSharp.Data.GraphQL.Client.DesignTime\FSharp.Data.GraphQL.Client.DesignTime.fsproj" Targets="Build" Properties="Configuration=$(Configuration);TargetFramework=netcoreapp2.0" />
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
group Common
22
FSharp.Core
3+
4+
group NetCoreAndStandard
35
System.Net.Http

0 commit comments

Comments
 (0)