Skip to content

Commit 40ee30e

Browse files
authored
Migrate to .NET 10 (#71)
* Migrate to .NET 10 * migrate to slnx * update dotnet tools and nuget packages * cleanup
1 parent f4ececf commit 40ee30e

File tree

20 files changed

+92
-174
lines changed

20 files changed

+92
-174
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ jobs:
1818
build:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v5
2222
with:
2323
fetch-depth: 1
2424
- run: |
2525
git fetch --prune --unshallow --tags
2626
echo exit code $?
2727
git tag --list
2828
29-
# Install .NET version as mandated by global.json
30-
- uses: actions/setup-dotnet@v4.1.0
29+
# Install the dotnet version as mandated by global.json
30+
- uses: actions/setup-dotnet@v5
3131
with:
3232
global-json-file: global.json
3333
dotnet-version: |
34-
6.x
34+
10.x
3535
env:
3636
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3737

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<MinVerDefaultPreReleasePhase>canary</MinVerDefaultPreReleasePhase>
5-
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
4+
<MinVerDefaultPreReleaseIdentifiers>canary.0</MinVerDefaultPreReleaseIdentifiers>
5+
<MinVerMinimumMajorMinor>0.2</MinVerMinimumMajorMinor>
66

77
<LangVersion>latest</LangVersion>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="all" />
11+
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
1212
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.3" PrivateAssets="all"/>
1313
</ItemGroup>
1414
</Project>

Elastic.Abstractions.sln

Lines changed: 0 additions & 111 deletions
This file was deleted.

Elastic.Abstractions.slnx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Solution>
2+
<Folder Name="/build/">
3+
<File Path=".github/workflows/ci.yml" />
4+
<File Path="build.bat" />
5+
<File Path="build.sh" />
6+
<File Path="Directory.Build.props" />
7+
<File Path="dotnet-tools.json" />
8+
<File Path="global.json" />
9+
<File Path="License.txt" />
10+
<File Path="nuget-icon.png" />
11+
<File Path="README.md" />
12+
<Project Path="build/scripts/scripts.fsproj" />
13+
</Folder>
14+
<Folder Name="/examples/">
15+
<Project Path="examples/Elastic.Ephemeral.Example/Elastic.Ephemeral.Example.csproj" />
16+
<Project Path="examples/Elastic.Managed.Example/Elastic.Managed.Example.csproj" />
17+
<Project Path="examples/Elastic.Xunit.ExampleComplex/Elastic.Xunit.ExampleComplex.csproj" />
18+
<Project Path="examples/Elastic.Xunit.ExampleMinimal/Elastic.Xunit.ExampleMinimal.csproj" />
19+
<Project Path="examples/ScratchPad/ScratchPad.csproj" />
20+
</Folder>
21+
<Folder Name="/src/">
22+
<File Path="src/Directory.Build.props" />
23+
<Project Path="src/Elastic.Elasticsearch.Ephemeral/Elastic.Elasticsearch.Ephemeral.csproj" />
24+
<Project Path="src/Elastic.Elasticsearch.Managed/Elastic.Elasticsearch.Managed.csproj" />
25+
<Project Path="src/Elastic.Elasticsearch.Xunit/Elastic.Elasticsearch.Xunit.csproj" />
26+
<Project Path="src/Elastic.Stack.ArtifactsApi/Elastic.Stack.ArtifactsApi.csproj" />
27+
</Folder>
28+
</Solution>

build/scripts/Paths.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let GenerateApiChanges = false
1717

1818
let Root =
1919
let mutable dir = DirectoryInfo(".")
20-
while dir.GetFiles("*.sln").Length = 0 do dir <- dir.Parent
20+
while dir.GetFiles("*.slnx").Length = 0 do dir <- dir.Parent
2121
Environment.CurrentDirectory <- dir.FullName
2222
dir
2323

build/scripts/Program.fs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ let main argv =
3030
Targets.Setup parsed arguments
3131
let swallowTypes = [typeof<ProcExecException>; typeof<ExceptionExiter>]
3232

33-
Targets.RunTargetsAndExit
34-
([target], (fun e -> swallowTypes |> List.contains (e.GetType()) ), ":")
33+
task {
34+
return! Targets.RunTargetsAndExitAsync([ target ], (fun e -> swallowTypes |> List.contains (e.GetType())), (fun _ -> ":"), null, null)
35+
} |> Async.AwaitTask |> Async.RunSynchronously
3536
0
3637

build/scripts/scripts.fsproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88
<ItemGroup>
99
<PackageReference Include="Argu" Version="6.0.0" />
10-
<PackageReference Include="Bullseye" Version="3.3.0" />
11-
<PackageReference Include="Proc" Version="0.9.1" />
10+
<PackageReference Include="Bullseye" Version="6.0.0" />
11+
<PackageReference Include="Proc" Version="0.11.0" />
1212
<PackageReference Include="Fake.Tools.Git" Version="5.15.0" />
1313
</ItemGroup>
1414

dotnet-tools.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
"isRoot": true,
44
"tools": {
55
"minver-cli": {
6-
"version": "4.3.0",
6+
"version": "6.0.0",
77
"commands": [
88
"minver"
99
],
1010
"rollForward": false
1111
},
1212
"assembly-differ": {
13-
"version": "0.14.0",
13+
"version": "0.17.0",
1414
"commands": [
1515
"assembly-differ"
1616
],
1717
"rollForward": false
1818
},
1919
"release-notes": {
20-
"version": "0.5.2",
20+
"version": "0.10.0",
2121
"commands": [
2222
"release-notes"
2323
],
2424
"rollForward": false
2525
},
2626
"nupkg-validator": {
27-
"version": "0.7.0",
27+
"version": "0.10.1",
2828
"commands": [
2929
"nupkg-validator"
3030
],

examples/Elastic.Ephemeral.Example/Elastic.Ephemeral.Example.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<IsPackable>False</IsPackable>
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Elastic.Transport" Version="0.9.2" />
16+
<PackageReference Include="Elastic.Transport" Version="0.10.1" />
1717
</ItemGroup>
1818

1919
</Project>

examples/Elastic.Managed.Example/Elastic.Managed.Example.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<IsPackable>False</IsPackable>
77
</PropertyGroup>
88

0 commit comments

Comments
 (0)