Problem when upgrading Catel to new versions

Topics: Issues / bugs, Questions
Jul 31, 2013 at 4:38 PM
I already installed catel version 3.5.13404131515-beta (prerelease) and it works. but when i upgrade to version 3.6 or latest nightly build i get the following error.
First i upgrade Catel.Core then Catel.MVVM and then other packages as you say in a blog post.
Image
Can anyone help me?
Coordinator
Jul 31, 2013 at 5:45 PM
Make sure to do a full required and check if none of the project has a corrupt reference (which means the hintpath of the catel assembly reference is some different directory than the nuget packages folder).
Jul 31, 2013 at 6:59 PM
I checked. there was no corrupt references. this is stack trace:
 at System.Reflection.Emit.InternalAssemblyBuilder.GetExportedTypes()
   at Catel.FluentValidatorProvider.GetValidator(Type targetType)
   at Catel.Data.ValidatorProviderBase.<>c__DisplayClass1.<Catel.Data.IValidatorProvider.GetValidator>b__0()
   at Catel.Caching.CacheStorage`2.GetFromCacheOrFetch(TKey key, Func`1 code, ExpirationPolicy expirationPolicy, Boolean override)
   at Catel.Caching.CacheStorage`2.GetFromCacheOrFetch(TKey key, Func`1 code, Boolean override, TimeSpan expiration)
   at Catel.Data.ValidatorProviderBase.Catel.Data.IValidatorProvider.GetValidator(Type targetType)
   at Catel.Data.CompositeValidatorProvider.<>c__DisplayClass7.<GetValidator>b__3(IValidatorProvider validatorProvider)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Catel.Data.CompositeValidatorProvider.GetValidator(Type targetType)
   at Catel.Data.ValidatorProviderBase.<>c__DisplayClass1.<Catel.Data.IValidatorProvider.GetValidator>b__0()
   at Catel.Caching.CacheStorage`2.GetFromCacheOrFetch(TKey key, Func`1 code, ExpirationPolicy expirationPolicy, Boolean override)
   at Catel.Caching.CacheStorage`2.GetFromCacheOrFetch(TKey key, Func`1 code, Boolean override, TimeSpan expiration)
   at Catel.Data.ValidatorProviderBase.Catel.Data.IValidatorProvider.GetValidator(Type targetType)
   at Catel.Data.ModelBase.get_Validator()
   at Catel.Data.ModelBase.Validate(Boolean force, Boolean validateDataAnnotations)
   at Catel.Data.ModelBase.Validate(Boolean force)
   at Catel.Data.ModelBase.SetDirtyAndAutomaticallyValidate(String propertyName, Boolean setDirtyAndAllowAutomaticValidation)
   at Catel.Data.ModelBase.RaisePropertyChanged(Object sender, PropertyChangedEventArgs e, Boolean setDirtyAndAllowAutomaticValidation, Boolean isRefreshCallOnly)
   at Catel.Data.ModelBase.RaisePropertyChanged(Object sender, AdvancedPropertyChangedEventArgs e)
   at Catel.Data.ObservableObject.RaisePropertyChanged(Object sender, String propertyName, Object oldValue, Object newValue)
   at Catel.Data.ObservableObject.RaisePropertyChanged(String propertyName, Object oldValue, Object newValue)
   at Catel.Data.ModelBase.SetValue(PropertyData property, Object value, Boolean notifyOnChange, Boolean validateAttributes)
   at Catel.Data.ModelBase.SetValue(PropertyData property, Object value)
   at DAL.Domain.User.set_Id(Int32 value) in h:\C# Projects\Windows\WPF\Accounting\DAL\Domain\User.cs:line 11
   at lambda_method(Closure , Shaper )
   at System.Data.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)
   at lambda_method(Closure , Shaper )
   at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
   at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__0[TResult](IEnumerable`1 sequence)
   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.First[TSource](IQueryable`1 source)
   at UI.ViewModels.User.LogOnViewModel.OnLogOnExecute() in h:\C# Projects\Windows\WPF\Accounting\UI\ViewModels\User\LogOnViewModel.cs:line 56
   at Catel.MVVM.Command`2.Execute(TExecuteParameter parameter, Boolean ignoreCanExecuteCheck)
   at Catel.MVVM.Command`2.Execute(TExecuteParameter parameter)
   at Catel.MVVM.Command`2.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()
Coordinator
Jul 31, 2013 at 8:59 PM
I see you are using FluentValidation. We have probably updated that in the meantime, you should check out the release notes. If you turn on "break on all exceptions" you should see the actual reason why this breaks.
Aug 1, 2013 at 3:53 PM
Yes the problem is when i use fluent validation. When you update that?!
Coordinator
Aug 1, 2013 at 9:59 PM