Winforms/WPF .NET9.0 app cannot be ran on Windows 10 20H2(OS build 19042.2965)
Describe the bug
Winforms/WPF .NET9.0 app cannot be ran on Windows 10 20H2(OS build 19042.2965), but .NET 8.0 apps work well
To Reproduce
-
Install the latest .NET 9.0 RC2 SDK build from: https://github.com/dotnet/sdk/blob/main/documentation/package-table.md
-
Create a Winforms application by CLI
-
Build and run created Winforms application by CLI
Actual result: dotnet build successfully, but dotnet run failed with nonsense characters output, Winforms runtime doesn't display
https://learn.microsoft.com/en-us/lifecycle/products/windows-10-enterprise-and-education shows support for Windows 10 Enterprise version 20H2 ended on May 9, 2023.
https://learn.microsoft.com/en-us/dotnet/core/install/windows#supported-versions says .NET is not supported on end-of-life versions of Windows.
@Olina-Zhang - are you sure this is specific to Windows 10 20H2(OS build 19042.2965)? Otherwise it looks like a dupe of https://github.com/dotnet/msbuild/issues/10579
The screen shot shows a "Faulting application" error in the Application event log. https://github.com/dotnet/msbuild/issues/10579 would not cause that.
@Tanya-Solyanik Today I verified more Windows versions, It also reproes in Windows 10 21H1, but not Windows 10 21H2 and above. This issue is about created Winforms/WPF apps cannot be ran.
@merriemcgaw are there any known issues with Windows 10 21H1?
With Win10 21H1 in general or with WinForms? I think this issue is the one report I've seen for WinForms. @Olina-Zhang has your team encountered any other issues? Does the .NET version you try make a difference here?
@merriemcgaw this issue is about Winforms/WPF app failed to use CLI dotnet run for created .NET 9.0 apps on only Windows 10 20H2 and 21H1, we cannot see runtime form displayed, but for .NET 8 works well. Now we cannot find OS image in Azure portal to create these machines to verify the incoming .NET 9.0 GA build, because these 2 OSes are out of support.
@jamshedd are we supporting Win10 20H2, correct? In that case I'd think we can close this issue. I wouldn't want to spend much resources trying to diagnose for an OS we actively don't support.
On 21H2 can confirm .net 9.0.101 wont work on it now. Major incompatibility.
I can confirm that .net WPF application target to .net 9 and .net 10 preview can not run on windows 22H2 (10.0.19045.2908), run the application does not show the main window and the process silently shutdown after a few seconds. Downgrade to .net 8 can run on the same PC. This is a very serious bug!
See #https://github.com/dotnet/docs/issues/42600
Adding <CETCompat>false </CETCompat> to the .csproj of the application opts out of the CET