microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.34k stars 2.21k forks source link

Self-Contained Single-File Win Form app does not run #1285

Closed jwu-dharmo closed 3 years ago

jwu-dharmo commented 3 years ago

I am on VS 2019 16.8.3 with .Net 5.0.

I have created a simple Win Form project without any NuGet or project dependency. I have made sure it runs out of the IDE.

When I published the project to a self-contained single file exe, it does not run. The Task explorer briefly showed the exe and switch it to suspended before killing it. The exe worked fine after I republished it either without the single-file or the self-contained option. It seems like both options cannot co-exist.

Any idea?

leecow commented 3 years ago

This issue was moved to dotnet/winforms#4437