Skip to content

Accommodate WinUI 2/3 dependencies per-experiment#139

Merged
michael-hawker merged 10 commits intomainfrom
feature/winui-2-3-deps-per-experiment
Jun 6, 2022
Merged

Accommodate WinUI 2/3 dependencies per-experiment#139
michael-hawker merged 10 commits intomainfrom
feature/winui-2-3-deps-per-experiment

Conversation

@Arlodotexe
Copy link
Copy Markdown
Member

Closes #132

This PR adds placeholder props files in all library projects that allow for easy adding of WinUI 2 / 3 dependenies under Uno / Native.

This was tested with the WrapPanel in the Windows Community Toolkit, and works under UWP/WinAppSDK and Android/Wasm via WinUI 2 / Android via WinUI 3.

Wasm under WinUI 3 wasn't testable due to #77.

Because of the differences in namespaces between the WinUI 2 WCT vs the WinUI 3 WCT, a small workaround had to be used, seen below along with example ProjectReferences.

Screenshot 2022-06-03 123153

This workaround can be removed when we finish syncing the namespaces in both packages.

@Arlodotexe Arlodotexe added enhancement Improvement to an existing feature dev loop ➰ For issues that impact the core dev-loop of building experiments templating labels Jun 3, 2022
@michael-hawker
Copy link
Copy Markdown
Member

FYI, even after the toolkit merges namespaces, we'll still need to pivot on UWP vs. WinUI 3, and do similar things for other packages like the Behaviors (at least there I think they may use the same namespace?). It'll just remove the need for the namespace/control reference trick.

Unless you meant something else by 'placeholder props'

Copy link
Copy Markdown
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be great! Have some comments/suggestions to improvements on instructions.

Comment thread template/lab/src/Labs.WinUI.Dependencies.props Outdated
Comment thread template/lab/src/Labs.WinUI.Dependencies.props Outdated
Comment thread template/lab/src/Labs.WinUI.Dependencies.props Outdated
Comment thread template/lab/src/Labs.WinUI.Dependencies.props Outdated
Comment thread template/lab/src/Dependencies.WinUI2.props
Comment thread template/lab/src/Dependencies.WinUI2.props
@Arlodotexe
Copy link
Copy Markdown
Member Author

Unless you meant something else by 'placeholder props'

This refers to the empty props files where the user can add PackageReferences

Comment thread labs/CanvasLayout/src/Dependencies.WinUI3.props Outdated
Comment thread labs/CanvasLayout/src/Dependencies.WinUI3.props Outdated
@Arlodotexe Arlodotexe requested a review from michael-hawker June 6, 2022 20:27
Copy link
Copy Markdown
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like this a lot better, now we're just adding two files per project vs. 3 (one of which was to be ignored). Seems simpler. 🎉

@michael-hawker michael-hawker merged commit aba0670 into main Jun 6, 2022
@delete-merged-branch delete-merged-branch bot deleted the feature/winui-2-3-deps-per-experiment branch June 6, 2022 22:13
Martin1994 pushed a commit to Martin1994/Labs-Windows that referenced this pull request Sep 2, 2023
* Added props files for WinUI 2 and WinUI 3 dependencies

* Fixed an issue where WinUI version had to be swapped for Uwp or WinAppSdk to get dependencies

* Fixed UWP TargetFramework check

* Update template/lab/src/Labs.WinUI.Dependencies.props

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Fixed invalid WinAppSdk check

* Rename UseWinUI to WinUIMajorVersion

* Added note for NS2.0 dependencies

* Update labs/CanvasLayout/src/Dependencies.WinUI3.props

* Moved lab WinUI dependency data to existing Uno props file

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev loop ➰ For issues that impact the core dev-loop of building experiments enhancement Improvement to an existing feature templating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accommodate WinUI 2/3 dependencies per-experiment

2 participants