Build everything as .NET 10#2899
Conversation
| </PropertyGroup> | ||
| <PropertyGroup> | ||
| <!-- Disable package pruning warnings when using Paket --> | ||
| <NoWarn>NU1510</NoWarn> |
There was a problem hiding this comment.
There are warnings about package pruning in the builds on .NET 10 - see fsprojects/Paket#4307
| Common = { defaults.Common with WorkingDirectory = "src/app/fake-cli/" } | ||
| MSBuildParams = setMsBuildParams defaults.MSBuildParams } | ||
|
|
||
| DotNet.msbuild setParams "fake-cli.fsproj" |
There was a problem hiding this comment.
Pretty much everything in the build just worked after moving to .NET 10, but one issue was with the tool for building the .deb package.
Firstly, the current dotnet tool release is built as several .NET versions but not 10, and has roll forward disabled (see quamotion/dotnet-packaging#268) . Enabling roll forward made the build pass on Windows and Linux, but macOS failed with some issues about .NET 9 not being able to build .NET 10 assemblies, as though it was using the old SDK even though global.json points at .NET 10.
Changing it to use the dotnet-deb CreateDeb MSBuild tasks instead of the global tool has made it work on all 3 platforms, but that needs a review to confirm that it's ok.
| @@ -1,110 +0,0 @@ | |||
| { | |||
There was a problem hiding this comment.
I don't believe that this or PaketRestoreTask.dll are needed any more (it looks to me like it was added in Paket 4, and then removed in 4 as well, back in 2017), though I don't know any of the history of that.
| NuGet.Frameworks (6.12.4) | ||
| NuGet.Packaging (6.12.4) | ||
| Newtonsoft.Json (13.0.4) | ||
| NuGet.Common (6.14.3) |
There was a problem hiding this comment.
paket.lock changes largely done just by adding changing the TFMs in paket.dependencies and running an update.
One note: NuGet packages left at 6.14 instead of v7, because 7 doesn't support .NET Standard 2.0 any more, and some of the consumers here are multi-targetted as .NET standard 2.0 and .NET 10.0
Test Results 12 files ±0 12 suites ±0 37m 41s ⏱️ + 7m 22s Results for commit 11ccaba. ± Comparison against base commit e8e1cae. This pull request removes 3 and adds 3 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Change global.json .NET 6 to 8 Search and replace targetframeworks from fsproj files to add net8.0 Add net8.0 to paket.dependencies dotnet paket install to find .NET8 compatible dependencies Expecto had to be hardcoded for now, because some tests are running on netstandard2.0 library (hopefully we can update this separately later) MSBuild.StructuredLogger problem: DisableInternalBinLog = true had to be added to build.fsx NuGet commands (hopefully we can update this separately later) A few places of code had new overrides so had to explicitly type to strings SdkAssemblyResolver to default .NET 8 as well Readme update GitHub pipeline configs: Add .NET 8 install.
…l has to be upgraded from 16 to 20, to make GenerateDocs task pass.
…the 8.0.0 alpha build Instead of pulling the 6.1.X build off NuGet.org. This might bootstrap the tests enough to get them all passing
…n 8.0.0 instead of 6.0.0
Because it might be .NET 8 releases now
… up the fix for GHSA-w3q9-fxm7-j8fq Also updates transitive dependencies on System.Text.Json to
d240366 to
bad8647
Compare
There was a problem hiding this comment.
Pull request overview
Updates the FAKE build, test infrastructure, templates, and dependency management to target and run on .NET 10 (built on top of PR #2852’s earlier .NET 8 efforts).
Changes:
- Retargets most projects (apps, tests, templates, tools) from
net6.0tonet10.0and updates related test/build paths. - Updates Paket/MSBuild integration and dependency sets (
paket.dependencies,paket.lock) to align with the new target framework strategy. - Adjusts CI workflows and build scripts to use .NET 10 and to install/use locally-built runner artifacts.
Reviewed changes
Copilot reviewed 124 out of 127 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/TestTools/TeeTool/TeeTool.csproj | Retarget test tool to net10.0 |
| src/test/TestTools/StandardOutputErrorTool/StandardOutputErrorTool.csproj | Retarget test tool (currently net8.0) |
| src/test/Fake.ExpectoSupport/Fake.ExpectoSupport.fsproj | Retarget test support project to net10.0 |
| src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs | Template test adjustments (NuGet.config, uninstall behavior) |
| src/test/Fake.DotNet.Cli.IntegrationTests/Fake.DotNet.Cli.IntegrationTests.fsproj | Retarget integration tests to net10.0 |
| src/test/Fake.Core.UnitTests/Fake.Core.UnitTests.fsproj | Retarget unit tests to net10.0 |
| src/test/Fake.Core.IntegrationTests/TestHelpers.fs | Adjust integration test runner pathing for net10 debug/release |
| src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs | Tool install workaround via explicit manifest path |
| src/test/Fake.Core.IntegrationTests/Fake.DotNet.sdkAssemblyResolver.fs | Update SDK resolver integration tests to .NET 10 expectations |
| src/test/Fake.Core.IntegrationTests/Fake.Core.IntegrationTests.fsproj | Retarget integration tests to net10.0 |
| src/test/Fake.Core.CommandLine.UnitTests/Fake.Core.CommandLine.UnitTests.fsproj | Retarget unit tests to net10.0 |
| src/template/fake-template/fake-template.fsproj | Template project TFMs updated to net10.0/netstandard2.0 |
| src/template/fake-template/Content/paket.dependencies | Template dependencies updated to prerelease feeds |
| src/template/fake-template/Content/fake.tool.sh | Tool bootstrap script updated for prerelease/downgrade behavior |
| src/template/fake-template/Content/fake.tool.cmd | Tool bootstrap script updated for prerelease/downgrade behavior |
| src/template/fake-template/Content/build.fake.fsx | Template inline deps updated to prerelease packages |
| src/template/fake-template/Content/build.buildtask.fsx | Template inline deps updated to prerelease packages |
| src/template/fake-template/Content/.template.config/template.json | Template post-actions updated to include prerelease |
| src/template/fake-template/Content/.config/dotnet-tools.json | Template tool manifest bumped to 10.0.0-alpha |
| src/app/Fake.Windows.Registry/Fake.Windows.Registry.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Windows.Chocolatey/Fake.Windows.Chocolatey.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Tools.SignTool/Fake.Tools.SignTool.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Tools.Rsync/Fake.Tools.Rsync.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Tools.Pickles/Fake.Tools.Pickles.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Tools.Octo/Fake.Tools.Octo.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Tools.GitVersion/Fake.Tools.GitVersion.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Tools.Git/Fake.Tools.Git.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Testing.SonarQube/Fake.Testing.SonarQube.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Testing.ReportGenerator/Fake.Testing.ReportGenerator.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Testing.Fixie/Fake.Testing.Fixie.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Testing.Common/Fake.Testing.Common.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Sql.SqlPackage/Fake.Sql.SqlPackage.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Runtime/SdkAssemblyResolver.fs | Default resolver behavior updated for .NET 10 |
| src/app/Fake.Runtime/FakeRuntime.fs | Default paket framework set expanded to include net10.0 |
| src/app/Fake.Runtime/FakeHeader.fs | Default paket framework line expanded to include net10.0 |
| src/app/Fake.Runtime/Fake.Runtime.fsproj | Retarget runtime to net10.0 |
| src/app/Fake.Runtime/CoreCache.fs | Minor type annotation adjustments |
| src/app/Fake.Runtime/CompileRunner.fs | Compile/caching behavior changes for updated compiler APIs |
| src/app/Fake.netcore/Properties/launchSettings.json | Update local debug working directory |
| src/app/Fake.netcore/Fake.netcore.fsproj | Retarget runner to net10.0 |
| src/app/Fake.Net.SSH/Fake.Net.SSH.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Net.Http/Fake.Net.Http.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Net.FTP/Fake.Net.FTP.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.JavaScript.Yarn/Fake.JavaScript.Yarn.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.JavaScript.TypeScript/Fake.JavaScript.TypeScript.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.JavaScript.Npm/Fake.JavaScript.Npm.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.IO.Zip/Fake.IO.Zip.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.IO.FileSystem/File.fs | Add explicit type annotation for byte array write |
| src/app/Fake.IO.FileSystem/Fake.IO.FileSystem.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Installer.Wix/Fake.Installer.Wix.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Installer.Squirrel/Fake.Installer.Squirrel.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Installer.InnoSetup/Fake.Installer.InnoSetup.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Xdt/Fake.DotNet.Xdt.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Xamarin/Fake.DotNet.Xamarin.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.XUnit2/Fake.DotNet.Testing.XUnit2.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.VSTest/Fake.DotNet.Testing.VSTest.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.SpecFlow/Fake.DotNet.Testing.SpecFlow.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.OpenCover/Fake.DotNet.Testing.OpenCover.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.NUnit/Fake.DotNet.Testing.NUnit.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.MSTest/Fake.DotNet.Testing.MSTest.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.MSpec/Fake.DotNet.Testing.MSpec.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.Expecto/Fake.DotNet.Testing.Expecto.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.DotCover/Fake.DotNet.Testing.DotCover.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Testing.Coverlet/Fake.DotNet.Testing.Coverlet.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Paket/Fake.DotNet.Paket.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.NuGet/Fake.DotNet.NuGet.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.MSBuild/Fake.DotNet.MSBuild.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Mage/Fake.DotNet.Mage.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.ILMerge/Fake.DotNet.ILMerge.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.FxCop/Fake.DotNet.FxCop.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Fsi/Fake.DotNet.Fsi.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.FSFormatting/Fake.DotNet.FSFormatting.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Fsdocs/Fake.DotNet.Fsdocs.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Fsc/Fsc.fs | Update internal compile result handling |
| src/app/Fake.DotNet.Fsc/Fake.DotNet.Fsc.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Cli/Fake.DotNet.Cli.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.DotNet.Cli/DotNet.fs | Update template uninstall command text/trace |
| src/app/Fake.DotNet.AssemblyInfoFile/Fake.DotNet.AssemblyInfoFile.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Documentation.DocFx/Fake.Documentation.DocFx.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Xml/Fake.Core.Xml.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Vault/Fake.Core.Vault.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.UserInput/Fake.Core.UserInput.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Trace/Fake.Core.Trace.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Tasks/Fake.Core.Tasks.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Target/Fake.Core.Target.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.String/Fake.Core.String.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.SemVer/Fake.Core.SemVer.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.ReleaseNotes/Fake.Core.ReleaseNotes.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Process/Fake.Core.Process.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.FakeVar/Fake.Core.FakeVar.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Environment/Fake.Core.Environment.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.DependencyManager.Paket/Fake.Core.DependencyManager.Paket.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.Context/Fake.Core.Context.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Core.CommandLineParsing/Fake.Core.CommandLineParsing.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.BuildServer.Travis/Fake.BuildServer.Travis.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.BuildServer.TeamFoundation/Fake.BuildServer.TeamFoundation.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.BuildServer.TeamCity/Fake.BuildServer.TeamCity.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.BuildServer.GitLab/Fake.BuildServer.GitLab.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.BuildServer.GitHubActions/Fake.BuildServer.GitHubActions.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.BuildServer.Bitbucket/Fake.BuildServer.Bitbucket.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.BuildServer.AppVeyor/Fake.BuildServer.AppVeyor.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Build.CMake/Fake.Build.CMake.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Azure.WebJobs/Fake.Azure.WebJobs.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Azure.Kudu/Fake.Azure.Kudu.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Azure.Emulators/Fake.Azure.Emulators.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Azure.CloudServices/Fake.Azure.CloudServices.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Api.Slack/Fake.Api.Slack.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/Fake.Api.GitHub/Fake.Api.GitHub.fsproj | Retarget library TFMs to net10.0/netstandard2.0 |
| src/app/fake-cli/fake-cli.fsproj | Retarget CLI tool to net10.0 and bump packaging targets |
| RELEASE_NOTES.md | Add alpha release notes for .NET 8/10 work |
| paket.lock | Large dependency refresh (incl. FSharp.Core/Paket/NuGet/etc.) |
| paket.dependencies | Update framework restrictions/groups to net10/netstandard2.0 |
| integrationtests/core-reference-assemblies-net60101/before/global.json | Pin integration test SDK to 10.0.101 |
| integrationtests/core-reference-assemblies-net60101-rollforward/before/global.json | Pin integration test SDK to 10.0.100 |
| integrationtests/core-reference-assemblies-net60100/before/global.json | Pin integration test SDK to 10.0.100 |
| global.json | Pin repo SDK to 10.0.100 |
| Fake.sln | Update solution VS version metadata and project type GUIDs |
| Directory.Build.props | Add NU1510 suppression for Paket builds |
| build.fsx | Update build script to net10 paths and packaging/test behavior |
| .paket/PaketRestoreTask.deps.json | Remove legacy deps file |
| .paket/paket.targets | Update restore target logic (command resolution, CLI detection) |
| .paket/Paket.Restore.targets | Add conditional handling + package version metadata wiring |
| .github/workflows/release.yml | CI release workflow now sets up .NET 10 |
| .github/workflows/build_and_test.yml | CI build/test workflow now sets up .NET 10 |
| .config/dotnet-tools.json | Update local tool versions and add rollForward fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| |> Seq.toList | ||
|
|
||
| let compileErrors = CompilationErrors.ofErrors errors | ||
| compileErrors, returnCode | ||
| compileErrors, (if returnCode.IsNone then 0 else 1) | ||
|
|
There was a problem hiding this comment.
FSharpChecker.Compile returns an exit code option
Not true in the current versions of FSharp.Compiler.Service - it was changed to return exn option in one of the updates (see current docs at https://fsharp.github.io/fsharp-compiler-docs/reference/fsharp-compiler-codeanalysis-fsharpchecker.html)
My bad, I thought I had added a note about that but apparently not - it might need more changes here to deal with that compiler change, as the integer code was passed up through the stack in a few places
| try | ||
| File.Move(compilerAssemblyTempPath, wishPath) | ||
| with :? System.IO.IOException -> | ||
| File.Move(compilerAssemblyTempPath, wishPath, true) | ||
| with :? System.IO.IOException as e -> | ||
| traceError ("Moving to destination " + wishPath) | ||
| reraise () |
| | FSharpDiagnosticSeverity.Warning -> FscResultMessage.Warning e.Message | ||
| | FSharpDiagnosticSeverity.Hidden -> FscResultMessage.Warning e.Message | ||
| | FSharpDiagnosticSeverity.Info -> FscResultMessage.Warning e.Message) | ||
|
|
||
| errors, exitCode | ||
| errors, (if exitCode.IsNone then 0 else 1) | ||
|
|
| "version": "6.1.4", | ||
| "commands": [ | ||
| "fake" | ||
| ] | ||
| ], | ||
| "rollForward": false |
There was a problem hiding this comment.
This would be a temporary situation - If we got an alpha build of a .NET 8 or 10 version out, it could be updated then, but as it stands 6.1.4 is the latest release version
| <OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) >= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent> | ||
| <ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) >= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets> | ||
| <Aliases Condition="%(PaketReferencesFileLinesInfo.Splits) >= 9">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8])</Aliases> | ||
| <ReferenceCondition Condition="%(PaketReferencesFileLinesInfo.Splits) >= 10">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[9])</ReferenceCondition> |
There was a problem hiding this comment.
We shouldn't really be making changes to Paket.Restore.targets here (I don't know if there is anything there that could be reported to Paket)
Description
Changes to build everything as .NET 10, built on top of #2852