Closed eddieyanez closed 3 years ago
Hello @eddieyanez, thanks for reaching. Matthew is taking a few days, in the mean time I'll assist you.
This is an issue so no problem posting it here. When you find this inconsistent behavior can you please try to invoke the Resync MFractor Solution Resources
from the MFractor/Tools
menu?
MFractor keeps a cache of the resources in the project like static resources, so we can lookup quickly to provide those meaningful warnings without having to re-parse the files all the time, which would impact the performance. There are several events that triggers this caching mechanism and sometimes it gets out of sync with the project state. This are mostly edge cases, just need to make sure that this is related to the resource sync. If your environment is getting too crazy and this out of sync happens to frequently, we will check further what's may happening.
Is it ok to you to proceed this way? Best regards, Rafael Veronezi
Hi @ravero, thanks. I re-sync the cache often which fixes the issue but only for a few minutes, and then I have to do it again. This also happens whenever I close and re-open the page. If the issue was every day or so, it would be fine, but as it is, it doesn't work for me. My solution has the usual shared + android + iOS projects, a .net core web project and the core library. I wouldn't say this is edge case or that my environment is too 'crazy', albeit I don't know exactly what you're trying to say by that.
Sorry @eddieyanez if I sounded confusing at first. By too crazy I meant to the problem itself, in a sense that if that happens too often we really need to check further. By edge case I meant that having to resync would be necessary very rarely.
So there's really something going on there. Can you confirm me if this happens only to this solution or overall?
Please send me logs so I can start investigating, you can post it here or mail me at rafael@mfractor.com.
Sorry for the inconvenience. Regards, Rafael Veronezi
I will try with another solution and let you know.
Sure, how do I extract the logs?
Not sure if you noted on my initial email but there was a mention of MFractor not working with Resizetizer.NT - something else to investigate. This has never worked, even when after re-synchronising Mfractor solution resources. I couldn't find further information except for a feature page here https://docs.mfractor.com/image-management/third-party/resizetizer/.
I can confirm that the issue also happens when working on a bare-bones project. For this, I've used the same project that I've shared with the Xamarin.Forms team here #13506.
You can download the solution with the code notes above here: TestSolution-MFractor.zip
Note A
<Application.Resources>
<ResourceDictionary>
<Color x:Key="Primary">#2196F3</Color>
<Style TargetType="Button">
<Setter Property="TextColor" Value="White"></Setter>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{StaticResource Primary}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="#332196F3" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</ResourceDictionary>
<!-- Colours and other basic items -->
<Color x:Key="SwitchedBlue">#2966AD</Color>
<Color x:Key="SwitchedRed">#CE0303</Color>
<Color x:Key="SwitchedOrange">#E28800</Color>
<Color x:Key="SwitchedYellow">#E0CD21</Color>
<Color x:Key="SwitchedBlack">#302F2F</Color>
<Color x:Key="SwitchedWhite">#FFFFFF</Color>
<Color x:Key="SwitchedGrey">#A9A9A9</Color>
<Color x:Key="SwitchedGreen">#2AB028</Color>
<Color x:Key="SwitchedBackground">#F2F2F2</Color>
<SolidColorBrush x:Key="SwitchedBackgroundBrush" Color="{StaticResource SwitchedBackground}"/>
<Color x:Key="SwitchedAltBackground">#DEDEDE</Color>
<Thickness x:Key="SwitchedFlowMargin" Bottom="10" />
<Thickness x:Key="SwitchedPadding">20</Thickness>
<Thickness x:Key="SwitchedSmallPadding">10</Thickness>
<Thickness x:Key="SwitchedButtonPadding">6,12</Thickness>
<x:Int16 x:Key="Spacing">30</x:Int16>
</Application.Resources>
Note B
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedBlack}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedRed}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedBlue}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedGrey}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedWhite}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedYellow}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedGreen}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedBackground}" />
<Label Text="Page A" FontSize="24" BackgroundColor="{StaticResource SwitchedAltBackground}" />
Note C
To extract the logs:
Ide.[Date].log
.You can zip them and send me!
Sent via email. Let me know if any issues or if you need more info.
Any news? I've sent you the logs 4 days ago. Have you received the email?
@eddieyanez I can reproduce this issue in the sample solution that you've provided and am looking into it now.
@eddieyanez we've published the version 4.4.7 of MFractor. Can you confirm if this resolved your issue? Thanks.
Hi Rafael, I've given the latest update a try for a few days now and it seems to have addressed the issue with the unrecognised resources. Amazing work!
However, the Resizetizer.NT issue also noted in the OP remains an issue. These are never recognised.
Eddie
Hi @eddieyanez, Thanks for your response, I'm glad its working fine now. About the Resizetizer.NT, this is a different issue and I would like to ask if you mind I'm closing this one and opening a new issue specific to the other problem. I'm already investingating on that one. Regards.
Of course. Let me know how I can help.
I've sent this via email to matthew@mfractor.com on 6th January however I've not received a response. Can you please check and get back to me?
Hi Matthew,
I’m not sure if this is something I should be posting on Github.
Ever since installing MFractor I cannot get it to reliably recognise resources from App.xaml file. I keep getting squiggly red lines everywhere. Sometimes they go away, sometimes they come back. Sometimes they come back once I re-open the page. I’ve tried running re-sync’ing resources several times which seems to help but I don’t think that I should have to do this so often.
Can you please help? Let me know what you need from me.
Examples below (all red lines on scroll bar are related):
Additionally, the documentation states that MFractor works with Resizetizer.NT but I also get squiggly red lines for those:
Here’s my App.xaml with the defined resources.
Regards, Eddie
Installation Information