Migrate projects to .NET 10 and align SDK tooling - #1174
Conversation
Move the single-target projects from TargetFrameworks to TargetFramework and finish the net10 migration bootstrap across the solution. Update package references to current versions, remove redundant framework packages, and address net10 analyzer and obsolete API warnings in the compiler, runtime libraries, and HTTP stream handling. Adjust the App tests for platform-neutral line endings and glob path expectations so the full test suite passes on the current environment.
Replace the remaining HttpWebRequest-based curl execution path with HttpClient and HttpRequestMessage. Introduce an internal request adapter so existing CURLOPT handling can continue to map onto the modern HTTP stack, and update curl response processing to use HttpResponseMessage while preserving headers, cookies, redirects, and request metadata. Validated with a clean solution build and the full test suite on the current environment.
Refresh the GitHub Actions workflow to build and test the solution on .NET 10 using current setup-dotnet and checkout actions. Update the dummy cache-restore project to net10, add the Linux update-cache shell script to the solution, and align the PowerShell and shell cache scripts with the current package ids and PeachpieVersion restore properties. Validated with a clean solution build and full solution test run on the current environment.
|
@dotnet-policy-service agree |
|
Hello Maxim, Thank you for the hard work. I'll update our build pipelines with .NET 10 SDKs and re-run the tests. Then let me check if everything is alright. Please keep in mind, in order to be able to compile PeachPie MSBuild projects inside Visual Studio, the SDK itself ( To achieve full .NET 10 across the toolchain, there is also https://github.com/peachpiecompiler/Peachpie.Microsoft.CodeAnalysis, a fork of Microsoft's Roslyn CodeAnalysis that lacks a few modern .NET 5+ features. We're continuously updating it as needed to support a later .NET feature. |
|
Hello Jakub, Thank you for the clarification. Understood on Before I prepare any follow-up changes, could you clarify:
|
I think the right path for full .NET 10 support is not to update the current Peachpie.Microsoft.CodeAnalysis fork in place, but to rebase PeachPie’s customizations onto a current dotnet/roslyn branch. |
|
We could do this in a separate branch of the current fork and then send a PR. My idea would be to use that branch to rebase onto a current dotnet/roslyn base first, and then reapply only the PeachPie-specific changes on top of it, instead of trying to evolve the existing old Roslyn-based branch in place. |
|
@FibonacciFox great thoughts - You are right with the Awesome work with the PR; there are some not-related changes that I need to check. Additionally, the github workflow needs to have caching disabled, I think - that's why it's probably failing. I'll add some notes to the code if I find anything that I don't understand :) |
|
Thanks, Jakub — I’ll work to contribute to the migration toward a newer Roslyn base. |
|
@jakubmisek |
|
That's amazing @FibonacciFox - I understand how much work it must have been. So far it looks alright, tests passing, and we would have the new Roslyn! which is awesome. (it may allow us to create a proper language integration for IDE and we'll have all the new C# features) |

Summary
net6.0tonet10.0Peachpie.NET.SdkWhat changed
TargetFrameworkstoTargetFrameworkwhere appropriatePeachpie.Runtimenullability attribute conflicts against newerSystem.RuntimeHttpWebRequesttoHttpClientnet10.0update-cache.ps1and addedbuild/update-cache.shfor Linux workflows.nugsImpact
.NET 10with no warnings or errorsValidation
dotnet build Peachpie.sln -nologo -v minimaldotnet test Peachpie.sln -nologo -v minimal --no-builddotnet test src/Tests/Peachpie.NET.SdkTests/Peachpie.NET.SdkTests.csproj -nologo -v minimal --no-builddotnet runagainstPeachpie.NET.Sdk/1.2.0-devpackages from.nugsNotes