Skip to content

Commit 6279050

Browse files
committed
fixup! Migrated to .NET 10
1 parent 00c25ea commit 6279050

5 files changed

Lines changed: 17 additions & 14 deletions

File tree

build/Program.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Target.create BuildTarget <| fun _ ->
7777
"FSharp.Data.GraphQL.slnx"
7878
|> DotNet.build (fun options -> {
7979
options with
80+
Common = DotNetCli.setVersion options.Common
8081
Configuration = configuration
8182
MSBuildParams = {
8283
options.MSBuildParams with
@@ -156,7 +157,7 @@ Target.create BuildIntegrationTestServerTarget <| fun _ ->
156157
options.MSBuildParams with
157158
DisableInternalBinLog = true
158159
}
159-
Common = { options.Common with CustomParams = Some "--no-dependencies" }
160+
Common = { DotNetCli.setVersion options.Common with CustomParams = Some "--no-dependencies" }
160161
})
161162

162163

samples/relay-book-store/relay-book-store.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
<PackageReference Include="HotChocolate.AspNetCore" />
1616
<PackageReference Include="Microsoft.Data.Sqlite" />
1717
<PackageReference Include="FsToolkit.ErrorHandling" />
18-
<PackageReference Include="System.Data.Common" />
19-
<PackageReference Include="System.Text.RegularExpressions" />
2018
<PackageReference Include="Thoth.Json.Net" />
2119
</ItemGroup>
2220

samples/star-wars-api/Program.fs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
module FSharp.Data.GraphQL.Samples.StarWarsApi.Program
22

3-
open Microsoft.AspNetCore
3+
open Microsoft.AspNetCore.Builder
44
open Microsoft.AspNetCore.Hosting
55
open Microsoft.Extensions.Configuration
6+
open Microsoft.Extensions.Hosting
67

78
let exitCode = 0
89

@@ -29,11 +30,14 @@ let buildWebHost (args : string array) =
2930
.AddJsonFile("appsettings.json", false, true)
3031
.AddJsonFile($"appsettings.{envName}.json", true) |> ignore
3132

32-
WebHost
33+
Host
3334
.CreateDefaultBuilder(args)
34-
.UseConfiguration(config)
35-
.ConfigureAppConfiguration(configureAppConfiguration)
36-
.UseStartup<Startup>()
35+
.ConfigureWebHostDefaults(fun webBuilder ->
36+
webBuilder
37+
.UseConfiguration(config)
38+
.ConfigureAppConfiguration(configureAppConfiguration)
39+
.UseStartup<Startup>()
40+
|> ignore)
3741

3842
[<EntryPoint>]
3943
let main args =

tests/FSharp.Data.GraphQL.IntegrationTests.Server/FSharp.Data.GraphQL.IntegrationTests.Server.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<PackageReference Include="Giraffe" />
1111
<PackageReference Include="GraphQL.Server.Ui.Voyager" />
1212
<PackageReference Include="HotChocolate.AspNetCore" />
13-
<PackageReference Include="Microsoft.Extensions.Http" />
1413
</ItemGroup>
1514

1615
<ItemGroup>
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
namespace FSharp.Data.GraphQL.IntegrationTests.Server
22

3-
open Microsoft.AspNetCore
3+
open Microsoft.Extensions.Hosting
44
open Microsoft.AspNetCore.Hosting
55

66
module Program =
77
let exitCode = 0
88

9-
let buildWebHost args =
10-
WebHost
9+
let buildHost args =
10+
Host
1111
.CreateDefaultBuilder(args)
12-
.UseStartup<Startup>()
12+
.ConfigureWebHostDefaults(fun webBuilder ->
13+
webBuilder.UseStartup<Startup>() |> ignore)
1314

1415
[<EntryPoint>]
1516
let main args =
16-
buildWebHost(args).Build().Run()
17+
buildHost(args).Build().Run()
1718
exitCode

0 commit comments

Comments
 (0)