MarimerLLC / csla

A home for your business logic in any .NET application.
https://cslanet.com
MIT License
1.26k stars 402 forks source link

Problems with BusyAnimation on Csla 8.2.6 #4203

Closed ProDInfo closed 1 month ago

ProDInfo commented 1 month ago

Describe the bug Can't load a BussAnimation control when upgrade from Csla 8.2.5 to 8.2.6 throw a exception: IndexOutOfRangeException: Index was outside the bounds of the array.

System.Windows.Markup.XamlParseException

Version and Platform CSLA version: 8.2.6 OS: Windows Platform: WPF

Code that Fails

            <csla:BusyAnimation Width="16"
                                Height="16"
                                Margin="0"
                                HorizontalAlignment="Left"
                                BorderBrush="Green"
                                Foreground="LimeGreen"
                                IsRunning="True"
                                IsTabStop="False" />

Stack Trace or Exception Detail System.Windows.Markup.XamlParseException: ''La invocación del constructor del tipo 'Csla.Xaml.BusyAnimation' que coincide con las restricciones de enlace especificadas produjo una excepción.' (número de línea: '22'; posición de línea: '14').'

at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at StatusDisplay.InitializeComponent() in ....StatusDisplay.xaml:line 1

Additional context If revert to version 8.2.5 work fine.

Fail on InitializeComponent of UserControl

rockfordlhotka commented 1 month ago

This is strange, because looking at the history of Csla.Xaml.Wpf and Csla.Xaml.Shared, nothing has been changed for months.

I wonder if some dependency (like a WPF package?) changed out from under us?

ProDInfo commented 1 month ago

Hello Rockford Lhotka, It's quite peculiar; I've reviewed everything before posting the history, yet nothing seems to have changed regarding this issue.

I search on Visual Studio a problem similar: https://developercommunity.visualstudio.com/t/Unable-to-run-WPF-app-SystemWindowsMar/10722395 https://github.com/dotnet/wpf/issues/9582

I'm experiencing issues with Visual Studio 17.12 Preview 1, and have switched to Visual Studio 17.11 to compile my applications until a resolution is found. I'm uncertain if this version was compiled using the stable or preview release. If it was compiled with the preview release, then it should be recompiled using the stable version.

rockfordlhotka commented 1 month ago

I generally do use the preview of VS - and obviously got burned this time 😞

ProDInfo commented 1 month ago

Before uploading version 8.2.7, could you test the library? I've looked into the GitHub issues for dotnet core and noticed that the problem is associated with the .NET Core 9.0 preview.