Closed maximilien-noal closed 9 months ago
Thanks for all the advice and pull requests. I'm just about to head off on holiday but you've given me lots to think about when I get back!
Have a great vacation !
Sidenote:
Again, using C# 4.0 is not fun at all, but possible. Using C# 2.0 is downright sadistic.
This is possible right now if multitargeting .NET Framework 2.0 and 4.0.
In the .csproj file, use TargetFrameworks instead of TargetFramework:
For Windows Vista/Seven/8 you'll have to target .NET Framework 4.0 (.NET 6 does not support a Windows version below Windows 10), as they ship with it, or ship with a later version of .NET Framework 4.X that is fully compatible and will run your program without having to install anything.
For Windows 98, you'll have to target .NET Framework 2.0.
Windows 98 does not ship with it. 98 users will have to install MDAC 2.6, Internet Explorer 5.5, Windows Installer 2.0 (ANSI version , known as "InstMsiA.exe"), and .NET Framework 2.0 (ANSI version, known as "dotnetfx.exe", not shipped by Microsoft anymore but available here, along with the other requirements)
For Windows 2000 or XP users, they can either install, .NET Framework 2.0 SP1 (Unicode version) or (for XP users only) .NET Framework 4.0.
Windows Forms is available on all those platforms.
The remaining fixes would be:
(this seems to be the only way to do it on Windows 11)
If you want to polyfill more modern C# features into .NET Framework 2.0, you could try those packages:
https://github.com/topics/polyfill?l=c%23&o=desc&s=forks
Use the same Condition when adding the PackageRefrence, to avoid build errors when the compiler tries to build for .NET Framework 4.0 and .NET 6.0.
Most of them (not all !) seem only to go back to .NET Standard 2.0 (which corresponds to .NET Framework 4.6.1), which is insufficient.