dotnet / dotnet/wpf

Add globbing support for WinUI

Open
#3,245 17 comments 0 reactions 0 assignees View on GitHub
Question
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

The WinUI team needs support for globbing support so that Visual Studio will not edit the .csproj whenever you add a .xaml file to the project. See this bug as a reference: https://github.com/microsoft/microsoft-ui-xaml/issues/2498

In following the same pattern as WPF, we can add a `UseWinUI` property that will pull in the `Microsoft.NET.WindowsDesktop.Sdk` and enable the globbing support.

If both `UseWinUI` and `UseWpf` are true, then the SDK can assume all xaml files are for WPF. The WinUI nuget will respect the use of `UseWpf` and not invoke the winui xaml compiler if that is the case. If only `UseWinUI` is true, then the SDK should not invoke PBT. Below is a table describing the different combinations and what should happen:

| UseWpf | UseWinUI | Xaml Compiler invoked |
| :-: | :-: | :-: |
| `True` | `True` | PBT |
| `True` | `False` | PBT |
| `False` | `True` | WinUI Compiler |
| `False` | `False` | neither |

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.