I created a WPF application with visual studio 2008 and created an installer for it. There is still nothing left. I realized that he lacked the automatic update function, and after several attempts at solving it, I decided to try deploying it. After successfully deploying to a network server, I noticed that the application crashes after installing the downloaded application. It complains about this:
in System.Windows.Markup.XamlParseException.ThrowException (String messages, Exception InnerException, Int32 LINENUMBER, Int32 linePosition Uri BaseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type OBJECTTYPE)
in System.Windows.Markup.XamlParseException.ThrowException (ParserContext ParserContext, Int32, Int32 LINENUMBER linePosition, message string, Exception InnerException) in System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine (message String, innerException exception)
in System.Windows.Markup.BamlRecordReader.CreateInstanceFromType (Type Type, Int16 typeId, Boolean throwOnFail)
on System.Windows.Markup.BamlRecordReader.GetElementAndFlags (BamlElementStartRecord bamlElementStartRecord, Object & element, ReaderFlags & flags, Type & delayCreatedType, Int16 & delayCreatedTypeId)
in System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord (BamlElementStartRecord bamlElementRecord)
in System.Windows.Markup.BamlRecordReader.ReadElementStartRecord (BamlElementStartRecord bamlElementRecord)
in System.Windows.Markup.BamlRecordReader.ReadRecord (BamlRecord bamlRecord)
in System.Windows.Markup.BamlRecordReader.Read (Boolean singleRecord)
in System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment ()
in System.Windows.Markup.TreeBuilder.Parse ()
in System.Windows.Markup.XamlReader.LoadBaml (stream stream, ParserContextContext parser, parent object, closeStream boolean method)
in System.Windows.Application.LoadBamlStreamWithSyncInfo (stream stream, ParserContext pc)
in System.Windows.Application.LoadComponent (Uri resourceLocator, Boolean bSkipJournaledProperties)
in System.Windows.Application.DoStartup ()
in System.Windows.Application. <.ctor> b__0 (object not used)
in System.Windows.Threading.ExceptionWrapper.InternalRealCall (delegate callback, object args, boolean isSingleParameter)
in System.Windows.Threading.ExceptionWrapper.TryCatchWhen (object source, delegate callback, args objects, boolean isSingleParameter, delegate catchHandler)
in System.Windows.Threading.Dispatcher.WrappedInvoke (delegate callback, args, boolean isSingleParameter, delegate catchHandler)
in System.Windows.Threading.DispatcherOperation.InvokeImpl ()
in System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext (object state)
in System.Threading.ExecutionContext.runTryCode (Object userData)
in System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup (TryCode code, CleanupCode return code, userData object)
in System.Threading.ExecutionContext.RunInternal (ExecutionContextual executionContext, ContextCallback callback, Object state)
in System.Threading.ExecutionContext.Run (ExecutionContextual executionContext, ContextCallback callback, Object state)
in System.Windows.Threading.DispatcherOperation.Invoke ()
in System.Windows.Threading.Dispatcher.ProcessQueue ()
on System.Windows.Threading.Dispatcher.WndProcHook (IntPtr HWND, Int32 MSG, IntPtr, IntPtr wParam, LPARAM, Boolean & pumped)
on MS.Win32.HwndWrapper.WndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean & processed)
in MS.Win32.HwndSubclass.DispatcherCallbackOperation (Object o)
in System.Windows.Threading.ExceptionWrapper.InternalRealCall (delegate callback, object args, boolean isSingleParameter)
in System.Windows.Threading.ExceptionWrapper.TryCatchWhen (object source, delegate callback, args objects, boolean isSingleParameter, delegate catchHandler)
in System.Windows.Threading.Dispatcher.WrappedInvoke (delegate callback, args, boolean isSingleParameter, delegate catchHandler)
in System.Windows.Threading.Dispatcher.InvokeImpl (DispatcherPriority priority, TimeSpan timeout, delegation method, object arguments, boolean isSingleParameter)
in System.Windows.Threading.Dispatcher.Invoke (DispatcherPriority priority, Delegate method, arg object)
on MS.Win32.HwndSubclass.SubclassWndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage (MSG & msg)
in System.Windows.Threading.Dispatcher.PushFrameImpl (DispatcherFrame)
in System.Windows.Threading.Dispatcher.PushFrame (DispatcherFrame)
in System.Windows.Threading.Dispatcher.Run ()
in System.Windows.Application.RunDispatcher (Object ignore)
in System.Windows.Application.RunInternal (window window)
in System.Windows.Application.Run (window window)
in System.Windows.Application.Run ()
on myApplication.App.Main ()
But the installer version, as in msi from the installation project, works fine. So I donβt see where the error comes from, because I have a design. Question 1 : Does anyone have a similar problem or is this a known problem?
Question 2 . If this is a known issue, then what are the alternatives. I can refuse clickonce, but then my auto-update function will be lost (since there is not one that is not ovekill or seriously outdated that I can find right now).
Thanks for reading this and for pointing me in the right direction.