Skip to content

V0.3.0/dotnet legacy framework - #8

Merged
gimlichael merged 6 commits into
mainfrom
v0.3.0/dotnet-legacy-framework
Nov 22, 2026
Merged

gimlichael merged 6 commits into
mainfrom
v0.3.0/dotnet-legacy-framework

Conversation

@gimlichael

Copy link
Copy Markdown
Member

This pull request introduces Windows-only support for legacy .NET Framework target frameworks (net471, net472, net48, and net481) across both console and test execution modes while preserving manifest schemaVersion 1 and existing modern .NET behavior. It adds an isolated temporary SDK-style project fallback for console mode, expands unit, integration, and container test coverage, and updates the documentation and changelog.

Legacy .NET Framework execution:

  • Accepts net471, net472, net48, and net481 natively on Windows while failing fast on non-Windows platforms and inside Linux containers, and bypasses the .NET Core release index, SDK channel check, and runtime list while still building with a selected .NET 10+ SDK
  • Falls back to an isolated temporary SDK-style project in console mode because dotnet run --file does not support .NET Framework TFMs directly, stripping validated matching preamble directives and cleaning up the temporary directory in finally
  • Generalizes temporary project generation to configure LangVersion=latest, WarningsAsErrors=NU1603;NU1605, and Microsoft.NETFramework.ReferenceAssemblies (unless already pinned in dependsOn) for .NET Framework targets, while passing --framework to dotnet run --project

Test coverage:

  • Adds unit and integration coverage for net471–net481 validation, rejection of unsupported TFMs such as netstandard2.0 and older or unrequested .NET Framework versions, and fail-fast non-Windows and Linux-container rejection
  • Adds Windows-gated console and xUnit v3 test execution coverage on net48 against lib/netstandard2.0 package assets, verifying exit-status and stderr preservation, preamble directive matching and conflict handling, and temporary artifact cleanup

Documentation and changelog:

  • Documents Windows-only .NET Framework (net471–net481) support, release-index and runtime-list bypass, non-executable TFM rejection, temporary .csproj fallback, and test-mode project configuration
  • Adds the 0.3.0 release entry and compare link to the changelog

aicia-bot and others added 4 commits November 22, 2026 14:31
Support legacy .NET Framework TFMs (net471, net472, net48, net481) natively on Windows by bypassing the .NET Core release index and runtime list, falling back to an isolated temporary SDK-style project for console mode, and configuring LangVersion=latest and Microsoft.NETFramework.ReferenceAssemblies.
Add unit, integration, and container tests covering .NET Framework TFM validation, non-Windows rejection, net48 console and xUnit v3 execution, and preamble directive handling.
Document Windows-only .NET Framework (net471-net481) support, release-index bypass, and temporary SDK-style project fallback behavior in README.
@gimlichael gimlichael self-assigned this Nov 22, 2026
@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are fixed and no new actionable issues were found.

Summary

Adds Windows-only .NET Framework support for net471, net472, net48, and net481 in console and test modes.

  • csrun accepts four legacy .NET Framework targets on Windows.
  • Legacy console programs run through temporary projects.
  • Legacy xUnit tests run against the selected framework.

Reviews (2) · Last reviewed commit: "✅ add directive stripping regression tes..." · Reviewed by Greptile

Comment thread csrun.ps1 Resolved
Comment thread csrun.ps1 Resolved
Use character-span removals in Get-ConsoleSource instead of splitting and rejoining lines so closing block-comment delimiters on directive lines and original CRLF line endings are preserved.
Add net48 console tests verifying that closing block comments on directive lines and CRLF line endings are preserved when directives are stripped.
@gimlichael
gimlichael merged commit 2d5efea into main Nov 22, 2026
10 checks passed
@gimlichael
gimlichael deleted the v0.3.0/dotnet-legacy-framework branch November 22, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants