Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into live #42139

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions docs/core/project-sdk/msbuild-props-desktop.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: MSBuild properties for Microsoft.NET.Sdk.Desktop
description: Reference for the MSBuild properties and items that are understood by the .NET Desktop SDK, which includes WPF and WinForms.
ms.date: 04/26/2024
ms.date: 08/13/2024
ms.topic: reference
author: adegeo
ms.author: adegeo
Expand Down Expand Up @@ -92,7 +92,7 @@ The `UseWPF` property controls whether or not to include references to WPF libra
</PropertyGroup>
```

When this property is set to `true`, .NET 5+ projects automatically import the [.NET Desktop SDK](#enable-net-desktop-sdk).
When this property is set to `true`, .NET projects automatically import the [.NET Desktop SDK](#enable-net-desktop-sdk).

### EnableDefaultApplicationDefinition

Expand Down Expand Up @@ -202,25 +202,7 @@ The `UseWindowsForms` property controls whether or not your application is built
</PropertyGroup>
```

When this property is set to `true`, .NET 5+ projects automatically import the [.NET Desktop SDK](#enable-net-desktop-sdk).

## Shared settings

- [DisableWinExeOutputInference](#disablewinexeoutputinference)

### DisableWinExeOutputInference

Applies to .NET 5 SDK and later.

When an app has the `Exe` value set for the `OutputType` property, a console window is created if the app isn't running from a console. This behavior is generally not desirable for a Windows Desktop app. With the `WinExe` value, a console window isn't created. Starting with the .NET 5 SDK, the `Exe` value is automatically transformed to `WinExe`.

The `DisableWinExeOutputInference` property reverts the behavior of treating `Exe` as `WinExe`. Set this value to `true` to restore the behavior of the `OutputType` property value of `Exe`. The default value is `false`.

```xml
<PropertyGroup>
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
</PropertyGroup>
```
When this property is set to `true`, .NET projects automatically import the [.NET Desktop SDK](#enable-net-desktop-sdk).

## See also

Expand Down
Loading