react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Improve/simplify process on aligning XAML/WinUI version

Open jonthysell opened this issue 3 years ago • 4 comments

Summary

Right now we support users specifying that they use WinUI3 at project creation time, which sets UseWinUI3 to true in their ExperimentalFeatures.props file.

We also allow users to override a flag in their react-native.config file.

Do we really need both mechanisms?

Motivation

We do a bunch of work during autolinking to "fix-up" files so that everything is using the same version of XAML, including reading the react-native config file, looking at ExperimentalFeatures.props, and then applying a bunch of changes to package.config files.

With the new PackageReference work, is it possible we can simplify and/or eliminate this part of autolinking?

Basic Example

No response

Open Questions

No response

jonthysell avatar Feb 14 '22 21:02 jonthysell

Found while investigating #9518.

Not that the existing ensureXAMLDialect code caused any regression, but it does traverse file trees and touch the disk.

jonthysell avatar Feb 14 '22 21:02 jonthysell

One option to avoid file traversal is to look up the appropriate WinUI property via whatever mechanism is used to solve #9165.

jonthysell avatar Feb 14 '22 21:02 jonthysell

This design made more sense when we were tracking WinUI3 against UWP and being able to change at build time was more relevant. But these days this would be reasonable to restrict as a project-creation flag, not a modifiable build flag.

Also the rollout of PackageReference support has shifted requirements here.

Action should be to retire the build flag so we can reduce need to change at build time.

chrisglein avatar Feb 17 '22 19:02 chrisglein

this may be done with the PackageReference work, right? if so can you close @jonthysell ?

asklar avatar Aug 11 '22 21:08 asklar

@jonthysell can we close this issue now?

chiaramooney avatar Mar 28 '23 18:03 chiaramooney