Closed Rosuavio closed 3 years ago
Hello RosarioPulella, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
@deanchalk and @Sergio0694, maybe you can us investigate whats going on here.
Mh, this is odd, the ListViewExtensions
sample page is working just fine for me with the app from the Store. Clicking on items also works correctly, invoking the command that's bound through the extension. Were you using the Store version or a local build? If it was a local build, this was with .NET Native in Release mode I assume? 🤔
Were you using the Store version or a local build? If it was a local build, this was with .NET Native in Release mode I assume? 🤔
I should have mentioned, Local build, Debug|x64
This seems similar to the issue we were seeing before with Menu as well. Which all work fine in Release mode I believe in the store app. So this may be an SDK issue?
We probably need to construct a small repo with XamlReader in an app to open an issue on WinUI?
I have the same issue.\ As soon i use an ICommand or Attached property with iCommand in a ListView you get this error.\ I posted this issue on Discord post a while ago, but it seems this issue was causing the problem initially why i couldn't upgrade to version 7.0.2.\ If i go back to version 6.1.1 the issue is gone.
These are the errors i get:
Windows.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found. Cannot deserialize XBF metadata property list as 'DoubleTappedCommand' was not found in type 'ISynergy.Framework.UI.Controls.ListViewAttached'
and
Windows.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found. Cannot deserialize XBF metadata property list as 'Command' was not found in type 'Microsoft.Xaml.Interactions.Core.InvokeCommandAction'.
Wondering if this is related or the same as https://github.com/microsoft/microsoft-ui-xaml/issues/4614 as we did take the dependency on WinUI 2.5 at that time.
We probably need a small sample with just our Toolkit ICommand
ListViewExtension helper in an app, see if it works. Then add WinUI 2.5 dependency and resources in and see if it breaks...
@RosarioPulella once you're done with the UI Tests, want to see if you can test this out in a file new UWP app and see what happens? Then if we have a repro showing its at least related to WinUI, we can attach to the above issue and raise with the WinUI team for 2.6.
I managed to trigger (x64, Debug) this in my own app after making changes in the configuration manager and updating a few Uno packages.
I have a hunch that this may be related to VS 16.10 in some way. If I can confirm it, it'll be the third tooling issue broken by 16.10 today alone 😅
Edit: I'm getting a different error message now related to Command being missing from InvokeActionCommand. Could be related, but this shows on 16.9 as well 🤷♂️
There is definitely something strange happening. I just noticed that one assembly is not referenced. The "Microsoft.UI.Xaml.Markup" library.
working version:
Non-working version:
I'm also missing the file "Microsoft.UI.Xaml.Markup.winmd" in the generated output of the failing application. However, adding this reference doesn't solve this issue.
FYI @ranjeshj @StephenLPeters - does this seem like the linked WinUI bug or something else you may be tracking?
hmm, I wonder if @alwu-msft might know what this is.
On the surface they do appear similar, although the fact that it only appears to be broken in Debug builds is a wrinkle. What happens if you add <EnableTypeInfoReflection>false</EnableTypeInfoReflection>
to the project and build as Debug
?
(@RealTommyKlein as FYI)
Pretty sure this is the linked bug I opened against WinUI 2, microsoft/microsoft-ui-xaml#4614 (or at least the error message is idewntical) - @michael-hawker and I had an email thread about it titled "Issue with ICommand Binding in UWP Debug Mode" and the error message/repro is identical to the issue I'd investigated.
Thanks @RealTommyKlein for the reminder! I had forgotten about that thread from before I was on a vacation in April. Yeah this still seems related then, we had just opened this issue on GitHub later for our own tracking.
I'm not sure what impact of your proposed workaround would have on the Toolkit (and its binary size), do you think a fix will be coming in WinUI 2.6 (as we do plan to update the dependency for our next revision)? Would it be helpful for us to confirm or try anything else on our side (like setup an isolated project which shows adding WinUI 2.5 causes the issue)?
FYI @alwu-msft we did confirm that we already should have EnableTypeInfoReflection
turned off:
I don't think it's fixed for WinUI 2.6, but @ranjeshj can confirm. For putting the workaround in the toolkit (and its samples), the size impact would be minimal and would allow the WCT sample apps to run, but it could still be hit by other external apps which consume WCT and use ICommand
themselves. Also forgot to mention this in my original reply, but I can also confirm that EnableTypeInfoReflection
is disabled across the entire WCT repo.
I'm not sure what impact of your proposed workaround would have on the Toolkit
@michael-hawker I would like to try this proposed workaround, but I could not find any mention of one anywhere. Can you elaborate so I can try it out locally?
I'm still hitting this error when testing WinUI 2.6 (x64, Debug, VS 16.10.2).
I am able to successfully open ListViewExtensions when I switch to Release mode, however.
There is an issue on my dev laptop with the WindowsDesktop SDK:
Hi guys, me again. I found another strange thing. To clarify some stuff, i'm using an own Mvvm library which has an Command and Command{T} class. This library is multiplatform and generates a .net standard (for UWP) and a .net 5.0 library. The Command is inheriting the System.Windows.Input.ICommand interface which seems totally different based on the framework i'm using.
When i analyze the Microsoft.Xaml.Behaviors package, it uses
Could this be the issue why we get all these ICommand/Command errors?
This was fixed as part of #4182 with the fix from WinUI 2.6.2
Describe the bug
A clear and concise description of what the bug is. After building the sample app locally (Debug|x64) when opening the
ListViewExtensions
sample the sample app crashes with the errorSteps to Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen. Sample opens
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional context
Add any other context about the problem here.