1

Possible Duplicate:
.NET application cannot start and receive XamlParseException

I have a WPF application that I have installed on a couple of computers, PC1 and PC2. It is developed on another computer. Both PC1 and PC2 have been running a copy of this program with no problems for a couple months. I then installed a new version of the program on both PCs, and it works on PC1 but not PC2.

On PC2, the application won't even boot, and I've had to use Window's event viewer to get the error message. I have no idea how to interpret it though...

Application: Raptor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException
Stack:
   at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
   at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   at System.Windows.Application.LoadComponent(System.Uri, Boolean)
   at System.Windows.Application.DoStartup()
   at System.Windows.Application.<.ctor>b__1(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at System.Threading.ExecutionContext.runTryCode(System.Object)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at System.Windows.Application.Run()
   at Raptor.App.Main()

I tried removing the new version of this application and installing the old one (that worked on PC2) but now that doesn't want to work for me...

I've also tried installing the application on a 3rd PC using both PC1 and PC2's logins. It works with PC1's login but again not PC2... I'm totally lost as to what could cause this...

Community
  • 1
  • 1
keynesiancross
  • 3,441
  • 15
  • 47
  • 87
  • You need to catch the exception. You have not posted a single line of code, thus, we are unable to tell you how to solve it. The exception you posted doesn't help us. The exception indicates its unable to parse the XML code, which indicates to me, this is a configration problem. – Security Hound Oct 22 '12 at 19:49
  • hmm, got ya. Any suggestions on how to catch it? Or just throw a try-catch around the InitializeComponent method? – keynesiancross Oct 22 '12 at 19:51
  • 2
    I +1'ed your question because I am in the same boat. My program works on my Dell, but MacBook Air does not run it and I checked the versions of the framework, they are the same. Check this question here, it gave me an idea of what may be wrong: http://stackoverflow.com/questions/7802176/net-application-cannot-start-and-receive-xamlparseexception I am also marking this question as duplicate :) Good luck! – Eugene Oct 23 '12 at 09:15
  • thanks Eugene, that helped me catch the error! Now I have to figure out how to solve that guy! if you post a link to your answer I can mark that as right... – keynesiancross Oct 23 '12 at 14:18

0 Answers0