Skip to content

Commit 64923fb

Browse files
committed
feat: support net8.0
1 parent efcbc04 commit 64923fb

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
- Add .NET 8 support #748 [@xperiandri]
11+
812
## [0.25.0] - 2025-07-11
913

1014
- Migrate from `Paket` to `Directory.Packages.props` #722 [@xperiandri]

build.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Target.create "SelfCheck" (fun _ ->
254254

255255
let consoleProj = Path.Combine(srcDir.FullName, "FSharpLint.Console", "FSharpLint.Console.fsproj") |> FileInfo
256256
let sol = Path.Combine(rootDir.FullName, solutionFileName) |> FileInfo
257-
exec "dotnet" $"run lint %s{sol.FullName}" consoleProj.Directory.FullName
257+
exec "dotnet" $"run --framework net9.0 lint %s{sol.FullName}" consoleProj.Directory.FullName
258258
)
259259

260260
// --------------------------------------------------------------------------------------

src/FSharpLint.Console/FSharpLint.Console.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66

77
<Title>FSharpLint.Console</Title>

src/FSharpLint.Core/FSharpLint.Core.fsproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
55
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<IsPackable>true</IsPackable>
@@ -146,6 +146,7 @@
146146
<PackageReference Include="Ionide.ProjInfo.FCS" />
147147
<PackageReference Include="Ionide.ProjInfo" />
148148
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" />
149+
<PackageReference Update="Microsoft.Build" ExcludeAssets="runtime" Condition="$(TargetFramework) == 'net8.0'" VersionOverride="17.11.31" />
149150
<PackageReference Include="Microsoft.Build.Locator" />
150151
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="runtime" />
151152
<PackageReference Include="Microsoft.Build.Tasks.Core" ExcludeAssets="runtime" />

tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ module Tests =
3434
basePath </> "src" </> "FSharpLint.Console" </> "bin" </> configDirName |> DirectoryInfo
3535

3636
let dll =
37-
match Seq.tryExactlyOne (binDir.EnumerateDirectories()) with
38-
| Some dllDir ->
39-
dllDir.FullName </> "dotnet-fsharplint.dll"
40-
| None -> failwithf "No folder (or too many of them) found in %s" binDir.FullName
37+
let dllDir =
38+
binDir.EnumerateDirectories()
39+
|> Seq.sortByDescending _.Name
40+
|> Seq.tryHead
41+
match dllDir with
42+
| Some dir -> dir.FullName </> "dotnet-fsharplint.dll"
43+
| None -> failwithf "No target framework folder found in %s" binDir.FullName
4144

4245
let startInfo = ProcessStartInfo
4346
(FileName = "dotnet",

0 commit comments

Comments
 (0)