sfryers / MT32Editor

Timbre editor and patch librarian for MT-32 compatible devices
https://www.vogons.org/viewtopic.php?f=29&t=93609
GNU General Public License v3.0
19 stars 0 forks source link

Windows 98 and XP support #6

Closed maximilien-noal closed 9 months ago

maximilien-noal commented 1 year ago

This is possible right now if multitargeting .NET Framework 2.0 and 4.0.

In the .csproj file, use TargetFrameworks instead of TargetFramework:

<TargetFrameworks>net40;net20;net60</TargetFrameworks>

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:

<ItemGroup>
    <PackageReference Condition="'$(TargetFramework)' == 'net20'" Include="LINQlone" Version="1.1.0" />
</ItemGroup>

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.

sfryers commented 1 year 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!

maximilien-noal commented 1 year ago

Have a great vacation !

Sidenote:

Again, using C# 4.0 is not fun at all, but possible. Using C# 2.0 is downright sadistic.