sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Winforms/WPF .NET9.0 app cannot be ran on Windows 10 20H2(OS build 19042.2965)

Open Olina-Zhang opened this issue 1 year ago • 1 comments

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

  1. Install the latest .NET 9.0 RC2 SDK build from: https://github.com/dotnet/sdk/blob/main/documentation/package-table.md

  2. Create a Winforms application by CLI image

  3. 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 image

Olina-Zhang avatar Aug 30 '24 06:08 Olina-Zhang

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.

KalleOlaviNiemitalo avatar Aug 30 '24 09:08 KalleOlaviNiemitalo

@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

Tanya-Solyanik avatar Sep 01 '24 18:09 Tanya-Solyanik

The screen shot shows a "Faulting application" error in the Application event log. https://github.com/dotnet/msbuild/issues/10579 would not cause that.

KalleOlaviNiemitalo avatar Sep 02 '24 02:09 KalleOlaviNiemitalo

@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.

Olina-Zhang avatar Sep 02 '24 07:09 Olina-Zhang

@merriemcgaw are there any known issues with Windows 10 21H1?

baronfel avatar Oct 29 '24 19:10 baronfel

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 avatar Oct 29 '24 19:10 merriemcgaw

@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.

Olina-Zhang avatar Oct 30 '24 01:10 Olina-Zhang

@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.

merriemcgaw avatar Nov 15 '24 00:11 merriemcgaw

On 21H2 can confirm .net 9.0.101 wont work on it now. Major incompatibility.

snintendog avatar Jan 03 '25 17:01 snintendog

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!

hxmcn avatar May 09 '25 00:05 hxmcn

See #https://github.com/dotnet/docs/issues/42600

Adding <CETCompat>false </CETCompat> to the .csproj of the application opts out of the CET

hxmcn avatar Jun 17 '25 22:06 hxmcn