Automatically infer WinExe output type for WPF and Winforms applications #20373
Labels
breaking-change
Indicates a .NET Core breaking change
🏁 Release: .NET 5
Work items for the .NET 5 release
Automatically infer WinExe output type for WPF and Winforms applications
We are now automatically setting the OutputType to WinExe if the application is WPF or WindowsForms. This will suppress any console windows that would start up if the OutputType was set to exe. dotnet/sdk#12448
Version introduced
.NET 5 Preview 8
Old behavior
We would use the value set in the project.
New behavior
Default the OutputType value to WinExe
Reason for change
We assume most users do not want a console window coming up during execution of a WPF or WindowsForms and with these application types using the .NET sdk instead of the WindowsDesktop SDK, we wanted to ensure the right default was set. Further, when add support for targeting iOS and Android in .NET Core, it will make it easier to multi-target between multiple platforms if they all use the same output type.
Recommended action
Set
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
in your project file to revert to the old behavior.Issue metadata
The text was updated successfully, but these errors were encountered: