Hi,
Well, I'm trying to use the AutomaticUpdater component with a WPF application, which I realize, is not really supported. I'm just up against an immovable deadline for release on Monday morning and need to have automatic updating in place, even if I will have to change to an updated AutomaticUpdater.dll later. My assumption was that the UI might not work correctly in a WPF environment, but that I could simply instantiate an AutomaticUpdater object in code and work with that, doing my own UI.
I have tried a number of different strategies. First, unless I explicitly call ForceCheckForUpdate, it doesn't seem to do anything - at least none of the events fire. However, when I call ForceCheckForUpdate, AutomaticUpdater.forceCheck throws a NullReferenceException (shown below). (By the way, I tried this in a WinForms app and it works just fine.)
I've also verified that everything works fine when I manually run wyUpdate.exe
I'm assuming that the AutomaticUpdater object is referring to some environmental element that is there in a WinForms app, that is not there in a WPF app.
Is there any known way to make this work?
Here's the exception:
System.NullReferenceException was unhandled by user code Message="Object reference not set to an instance of an object." Source="AutomaticUpdater" StackTrace: at wyDay.Controls.AutomaticUpdater.forceCheck(Boolean recheck, Boolean forceShow) at wyDay.Controls.AutomaticUpdater.ForceCheckForUpdate(Boolean recheck) at SuitePro.winUpdates.winUpdates_Loaded(Object sender, RoutedEventArgs e) in C:\Users\Brent\Documents\BPO\Programming\SuitePro\Forms\winUpdates.xaml.vb:line 27 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.RaiseEvent(RoutedEventArgs e) at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent) at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root) at MS.Internal.LoadedOrUnloadedOperation.DoWork() at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget) at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) InnerException: