-
Notifications
You must be signed in to change notification settings - Fork 56
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
Accommodate WinUI 2/3 dependencies per-experiment #132
Comments
Would these specific props files be part of each experiment or something we have all-up? As ideally, only each experiment's packages include whatever dependencies they need to work. We also have to account for differences across Uno for both sides as well, no? I do like the idea that we have two places to specify UWP + Uno dependencies vs. WinUI 3 + Uno dependencies and handle swapping that with the other script (as that's what controls that and in the CI). As once it's setup a developer shouldn't have to worry about it. I just want to make sure we make it accessible and straight-forward for folks to understand where they need to add dependencies and how (as their instinct is going to be right-click on the experiment library and 'manage nuget packages'). |
These props files would be part of each experiment.
I'm not sure I understand the question.
The Nuget Package Manager should work just fine for most cases. Dealing with the props files should only happen when you need to add an Uno-compatible UI library. Something to point out in docs, similar to how Uno does for the Community Toolkit. |
Related to #24 as well. |
Background
So far, Labs is set up to work with
The problem
While devs can easily add nuget packages to the library code for their experiment, it's not currently possible to add nuget packages that work under Uno and accommodate both WinUI 2 and 3.
The cause
Under everything except UWP and WinAppSDK, the projects share a target framework between WinUI 2 and 3.
Possible solutions
We fixed this for labs itself in #75 by using a powershell script. The script
UseUnoWinUI.ps1
modified the Labs.Uno.props file to switch between the WinUI 2 and WinUI 3 versions of the Uno packages, then suppresses git changes to prevent the user from changing the default for everyone else.Doing this exact same setup for experiment dependencies would quickly get a mess due to the user changing the file + git suppressing changes.
Instead, we should try something like this:
Then, in the
UseUnoWinUI.ps1
script, in addition to modifyingLabs.Uno.props
, it would check each experiment and modify theDeps.props
file to swap between importingWinUI2.props
andWinUI3.props
.The
ProjectTemplate
will need to be adjusted for this, as well as all existing experiments.Final note - pick better file names than the provided ones. They're shortened to fit in the graphic.
The text was updated successfully, but these errors were encountered: