sillsdev / l10nsharp

A .NET localization library for Windows Forms applications.
3 stars 10 forks source link

Adding Framework 4.8 and .NET8 to targets. #118

Closed josephmyers closed 3 months ago

josephmyers commented 5 months ago

This required platform-specific references in the project files. I also fixed a warning about Assembly.CodeBase and some .NET8 warnings about manually copying duplicate files into our nuget package folder when packing. These files appear to be duplicates of what is copied during the .NET8 packaging.

The only other change worth noting involves the "unknown language" detection in L10nCultureInfo. It appears, per the link listed in the comment at that point in the code, that our method of determining an unknown language no longer works, starting with Win10 (combined with .NET). The change I made should be compatible with older OS's, like Win7, but I don't have an easy way to confirm this.


This change is Reviewable

github-actions[bot] commented 5 months ago

Test Results

    3 files  +    2    84 suites  +56   16s :stopwatch: +10s 165 tests ±    0  160 :heavy_check_mark: ±    0    5 :zzz: ±  0  0 :x: ±0  495 runs  +330  480 :heavy_check_mark: +320  15 :zzz: +10  0 :x: ±0 

Results for commit d567f2e3. ± Comparison against base commit 5545cb61.

:recycle: This comment has been updated with latest results.

josephmyers commented 4 months ago

I need to lodge a version bump with semvar

rmunn commented 3 months ago

I just checked the Microsoft support site, and Framework versions 4.7.1, 4.7.2, and even 4.8 all have offline installers available for Windows versions as old as Windows 7 SP1. E.g., https://support.microsoft.com/en-us/topic/microsoft-net-framework-4-8-offline-installer-for-windows-9d23f658-3b97-68ab-d013-aa3c3e7495e0 lists supported Windows versions as Windows 7 SP1, Windows 8.1, Windows 10 version 1607 or later, plus a lot of Windows Server versions. Microsoft's announcement of 4.8.1 claimed that it was supported on Windows 10 and up, not mentioning Windows 7. I have found references elsewhere to Framework 4.8.1 being available for Windows 7, but I haven't been able to prove it. (I may still have a Win7 VM image I can dig up and test that; I'll report my results later).

Therefore, I'd suggest that it might be worth adjusting this PR to target .Net Framework 4.8 rather than 4.8.1. This would still allow libraries to move to .Net Standard 2.0 and be easy to consume from both .Net Framework and .Net 8.0 apps, while still allowing us to produce releases for users who, for one reason or another, are still stuck on older versions of Windows: our software that needs .Net Framework can offer a version with the 4.8 offline installer packaged with it if necessary.

josephmyers commented 3 months ago

Given the numerous changes here surrounding platforms and their tests, I made some super simple tables that lay out who all is running what.

Master: Windows Ubuntu
Framework 4.6.1 Yes -
Framework 4.8 - -
.NET8 - -
This PR: Windows Ubuntu
Framework 4.6.1 Yes -
Framework 4.8 Yes -
.NET8 Yes -
hahn-kev commented 3 months ago

just checked this out, ran the tests and it all seems to work correctly. Can we get this merged in?

josephmyers commented 3 months ago

@hahn-kev I don't think this will solve #116, but it might get you closer.