Revert `DisableWinExeOutputInference`
See original GitHub issueWith https://github.com/dotnet/sdk/issues/11398 the OutputType
a user explicitly sets in his projects is ignored, except when he sets DisableWinExeOutputInference
.
This is not acceptable and was not asked for by the community. https://github.com/dotnet/sdk/issues/11398 was not discussed and the feedback given there was simply ignored.
We now have a very, very confusing behavior where the users explicit choice of setting OutputType
to exe
is completely ignored.
Please see the following issues for reference:
- https://github.com/dotnet/sdk/issues/13331
- https://github.com/dotnet/sdk/issues/13624
- https://github.com/dotnet/wpf/issues/4314
- https://github.com/dotnet/wpf/issues/4138
- https://developercommunity2.visualstudio.com/t/WPF-NET-Core---Console-Application-does/1289479
There wasn’t even an explanation why this should be changed in the first place. The reasoning in the documentation at https://docs.microsoft.com/de-de/dotnet/core/compatibility/windows-forms/5.0/automatically-infer-winexe-output-type states “It’s assumed that most users don’t want a console window to open when a WPF or Windows Forms app is executed”. May i ask who assumes this because of which issues? Was this requested by someone? https://github.com/dotnet/sdk/issues/11398 did not mention any users/issues identifying this as an issue.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:16 (6 by maintainers)
Hi folks,
Sorry for the inconvenience this caused. We’ve reverted the change for .NET 6: #19651
@vatsan-madhavan
No you’re wrong. And that’s the issue I have with it.
You can specify the output type (select in Visual Studio UI the “Console Application”), close the settings, and when you open them again they are reverted. I think if you leave it like this, you should add “DisableWinExeOutputInference” automaticaly when the outputtype is changed via Visual Studio UI, or add an Info text (as I showed in my isse about this)