Accommodate WinUI 2/3 dependencies per-experiment#139
Conversation
|
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' |
michael-hawker
left a comment
There was a problem hiding this comment.
This is going to be great! Have some comments/suggestions to improvements on instructions.
This refers to the empty props files where the user can add PackageReferences |
Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
michael-hawker
left a comment
There was a problem hiding this comment.
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. 🎉
* 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>
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.
This workaround can be removed when we finish syncing the namespaces in both packages.