Skip to content

Commit 8e390fd

Browse files
.NET 9 (#222)
* net 9 compiles * build and test pipelines use dotnet 9 * dotnet 9.0.x for build and test workflows * CHANGELOG.md: update * add dotnet8/9 versions of testReferenceWorks to make sure there are no regressions for dotnet/8 LTS --------- Co-authored-by: Saulius Menkevičius <[email protected]>
1 parent a577df5 commit 8e390fd

File tree

21 files changed

+41
-22
lines changed

21 files changed

+41
-22
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu-24.04]
12-
dotnet: [8.0.404]
12+
dotnet: [9.0.x]
1313
runs-on: ${{ matrix.os }}
1414

1515
steps:

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [windows-latest, ubuntu-24.04]
13-
dotnet: [8.0.404]
13+
dotnet: [9.0.x]
1414
fail-fast: false
1515

1616
runs-on: ${{ matrix.os }}

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

66
## [Unreleased]
7+
* csharp-ls will now use and require .NET 8 runtime/SDK
8+
- PR by @lapponiandevil in https://github.com/razzmatazz/csharp-language-server/pull/222
79
* Upgrade Ionide.LanguageServerProtocol to 0.7.0:
810
- https://github.com/razzmatazz/csharp-language-server/pull/221
911
* Reduce startup notifications by using "window/logMessage"

global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.400",
3+
"version": "9.0.1",
44
"rollForward": "minor"
55
}
66
}

src/CSharpLanguageServer/CSharpLanguageServer.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<PropertyGroup>
55
<OutputType>Exe</OutputType>
6-
<TargetFramework>net8.0</TargetFramework>
6+
<TargetFramework>net9.0</TargetFramework>
77
<Description>C# LSP language server</Description>
88
<PackAsTool>true</PackAsTool>
99
<ToolCommandName>csharp-ls</ToolCommandName>

src/CSharpLanguageServer/Handlers/Workspace.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ module Workspace =
8282
match Path.GetExtension(change.Uri) with
8383
| ".csproj" ->
8484
do! context.WindowShowMessage "change to .csproj detected, will reload solution"
85-
context.Emit(SolutionReloadRequest (TimeSpan.FromSeconds(5)))
85+
context.Emit(SolutionReloadRequest (TimeSpan.FromSeconds(5:int64)))
8686

8787
| ".sln" ->
8888
do! context.WindowShowMessage "change to .sln detected, will reload solution"
89-
context.Emit(SolutionReloadRequest (TimeSpan.FromSeconds(5)))
89+
context.Emit(SolutionReloadRequest (TimeSpan.FromSeconds(5:int64)))
9090

9191
| ".cs" ->
9292
match change.Type with

tests/CSharpLanguageServer.Tests/CSharpLanguageServer.Tests.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
44

55
<IsPackable>false</IsPackable>
66
<GenerateProgramFile>false</GenerateProgramFile>

tests/CSharpLanguageServer.Tests/ReferenceTests.fs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ open Ionide.LanguageServerProtocol.Types
55

66
open CSharpLanguageServer.Tests.Tooling
77

8-
[<TestCase>]
9-
let testReferenceWorks() =
10-
use client = setupServerClient defaultClientProfile
11-
"TestData/testReferenceWorks"
8+
[<TestCase("TestData/dotnet9TestReferenceWorks")>]
9+
[<TestCase("TestData/dotnet8TestReferenceWorks")>]
10+
let testReferenceWorks(testDataDir: string) =
11+
use client = setupServerClient defaultClientProfile testDataDir
1212
client.StartAndWaitForSolutionLoad()
1313

1414
use classFile = client.Open("Project/Class.cs")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Class
2+
{
3+
public void MethodA(string arg)
4+
{
5+
}
6+
7+
public void MethodB(string arg)
8+
{
9+
MethodA(arg);
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<TargetFramework>net9.0</TargetFramework>
5+
</PropertyGroup>
6+
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.11" />
8+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.1" />
99
</ItemGroup>
1010
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.11" />
8+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.1" />
99
</ItemGroup>
1010
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66
</Project>

0 commit comments

Comments
 (0)