question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Revert `DisableWinExeOutputInference`

See original GitHub issue

With 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:

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:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
dsplaistedcommented, Aug 13, 2021

Hi folks,

Sorry for the inconvenience this caused. We’ve reverted the change for .NET 6: #19651

1reaction
jogibear9988commented, Apr 1, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

OutputType set to WinExe for WPF and WinForms apps - . ...
No action is required in your part. However, if you want to revert to the old behavior, set the DisableWinExeOutputInference property to true...
Read more >
Visual Studio 16.8 just disabled having a console in a WPF ...
1 and now the app won't open a console window, and when I open the project properties the 'Output type' says 'Windows Application',...
Read more >
Suddenly my WPF Core 3.1 app can no longer have a ...
Using Visual Studio 16.8.1: Create a WPF App (.NET); In the project properties, change the 'Output type' to 'Console Application'.
Read more >
How to run dotnet Core console application that shows the ...
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>. In your project file. See documentation. Try to set the <OutputType> back to Exe and add ...
Read more >
dotnet 5 破坏性改动WPF 和WinForms 的OutputType ... - 林德熙
... 上添加DisableWinExeOutputInference 属性修改为true 就可以了,代码如下 ... 更多细节请看官方文档Breaking change: OutputType set to WinExe for WPF and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found