-
Notifications
You must be signed in to change notification settings - Fork 80
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
Adding SettingsControls package to Microsoft.WindowsAppSDK 1.4 project stops ItemsView to work #234
Comments
It's not just the SettingsControl. I get the exception simply by adding CommunityToolkit.WinUI.UI.Controls.Core Version="7.1.2" to my project. |
The SettingsControl doesn't have anything to do with the Segmented control. The piece they share as dependency are the Extensions project, curious if adding that would resolve anything, but if anything NuGet should be installing all these anyway... Though we have seen other weird issues with UWP CommunityToolkit/Tooling-Windows-Submodule#79, but WASDK was working fine. @pluto-dev the 7.1.2 version was compiled against an even older version of the WASDK. The Settings Control was compiled against 1.3 as 1.4 was just released, we didn't want to force folks to have to update. @RobertK66 was there any warnings from NuGet about package downgrades? I think we need to see what the platform team says, as we tested, in general, a 1.4 app using our 1.3 built package, which should be a supported scenario, I thought. |
|
just made a quick re-test with yesterdays version (1.4.230913002) of WinAppSdk. Nothing changed. Problem still exists. |
Thanks @RobertK66 that's great info for us to know. I've raised the corresponding bug up with the platform team for assistance in this space since the crash is happening within the SDK. Also, since others have had packages of ours from 2 years ago and seen the same results, it's hard for us to know anything we're doing specifically that would be the root cause here as those packages are built entirely differently than the ones we have now. Hopefully, they can help us figure out what's going on here soon. 🤞 |
I think I found the cause of this issue. Steps to reproduce:
-> This now creates the described crash. (Note that my example Control does not make any sense at all, but the issue is triggered by loading xaml resources alone - no need to use this control!) You have 2 options to resolve this from here: I think the underlying problem is, that the first dll getting its resources loaded can decide which version of the ItemsRepeater gets used by all others !!??? |
Thanks for the investigation @RobertK66, that's very interesting. Can you swap your comments around and have the main detail in the microsoft-ui-xaml platform repo (will be easier for them to follow having the core details in their issue)? The platform handles the loading of resources/dll, so it seems like the fix is going to have to go there. We didn't want to bump our version of the WASDK when we released so people who haven't updated yet could still make use of the controls, we feel this should be a supported scenario. We'll raise this up with the platform team. |
ok coiped content to microsoft/microsoft-ui-xaml#8810 (comment) |
@RobertK66 the latest main build should be updated now, so this should be resolved using those packages. The platform issue still exists: microsoft/microsoft-ui-xaml#8810 - so any new components could introduce this issue again in the future. But for now, we should hopefully be aligned. Let us know if you encounter any other issues. Thanks! |
Thx. for this info. Waiting to see the platform improvements here ... To be honest, this issue was one of the contributing facts which finally brought me to abandon my 'developer plan' to use Win Ui 3 in some major new projects of mine. It seems to me that the underlying UI platform - with its 1.6k open issues!, and its 'strange' github source code and develop visibility - unfortunately does not really live up to the stated "Windows App SDK Family Promise" . Also at this time it is not clear to me if it gets enough investment from Microsoft to really be the 'future of Application Development for Windows'. Still using it for some hobby projects and looking forward to new releases 😄 ! |
This is still an issue moving forward with the Windows App SDK, but the 8.1-rc packages are built against 1.5, so they are available for folks to be compatible. |
To get rid of the -rc package I tested my app with In both cases the crash is avoided. But now I also stumbled over this new issue: #473 ! also reported here: microsoft/WindowsAppSDK#4649 |
Not sure if anybody ever reads developer rants on closed issues but in continuing this
I have to state here: I really appreciate the recent improvements of the "github usage" over at https://github.com/microsoft/microsoft-ui-xaml
mirroring some internal real work repositories, i was able to find the code bytes that finally fixed microsoft-ui-xaml#8810: Thx. for that. So finally as a developer I am happy to put this case to rest now 😄 ... ... thinking of the source code comment words '.. work around ..' one could continue to construct a scenario where multiple custom libraries using each other and compiled against different versions still could hit this problem. In absence of a more sophisticated Metadata/XAML versioning concept (or is there one?) maybe it would be better to sort the rest of this this array by SDK version number descending. Just my 2 cts. 🤣 |
Describe the bug
My Project uses Microsoft.WindowsAppSDK 1.4 and the new ItemsView Control.
When adding the CommunityToolkit.WinUI.Controls.SettingsControls (8.0.230907) package as new dependency the working ItemsView does not longer initialize. It crashes with:
Steps to reproduce
see also: microsoft/microsoft-ui-xaml#8810
see this repo for reproducing the crash: https://github.com/RobertK66/SettingsExpanderExample/tree/issue/sdk_8810
Expected behavior
ItemsView should work as before adding reference.
Screenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
Windows 11 Pro 22H2 22621.2134
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
No response
Device form factor
Desktop
Additional context
I found a fix/workaround by manually adding the CommunityToolkit.WinUI.Controls.Segmented package !
it seems there is a unwanted/unsatisfied transient dependency here ...
Help us help you
Yes, but only if others can assist.
The text was updated successfully, but these errors were encountered: