.NET приложение не может запуститься и получает XamlParseException

Я написал приложение, которое может устанавливаться и работать на моем компьютере для разработки (Window 7).

  • Среда разработки: Window 7, VS2010 WPF C# с установленными .NET 4 и .NET 3.5

На другом клиентском компьютере (XP SP3, 2 и 1), оно устанавливается без ошибок, но не может запуститься. В диспетчере задач видно, что приложение занимает память на короткое время, а затем само закрывается.

Я убедился в совместимости .NET 3.5 на моем рабочем компьютере и различных клиентских XP машинах следующим образом:

  • Приложение нацелено на .NET 3.5 (или 3.5 Client Profile)
  • Используйте VS2010 Installer для развертывания: цели .NET 3. 5 в Launch Condition
  • Никаких ошибок о совместимости с .NET во время отладки приложения и проекта установщика

eventvwr поймал следующее предупреждение:

 ¬º˛¿‡–Õ:   ¥ÌŒÛ
 ¬º˛¿¥‘¥:   .NET Runtime
 ¬º˛÷÷¿‡:   Œfi
 ¬º˛ ID:    1026
»’∆⁄:       2011-10-18
 ¬º˛:       15:18:32
”√ªß:       N/A
º∆À„ª˙: WWW-9DB69D5A3AF
√Ë ˆ:
Application: Foo.exe
Framework Version: v4.0.30319
Description: ”…”⁄Œ¥æ≠¥¶¿Ìµƒ“Ï≥££¨Ω¯≥Ã÷’÷π°£
“Ï≥£–≈œ¢: System.Windows.Markup.XamlParseException
∂—’ª:
   ‘⁄ System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
   ‘⁄ System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   ‘⁄ System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   ‘⁄ System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   ‘⁄ System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   ‘⁄ System.Windows.Application.LoadComponent(System.Uri, Boolean)
   ‘⁄ System.Windows.Application.DoStartup()
   ‘⁄ System.Windows.Application.<.ctor>b__1(System.Object)
   ‘⁄ System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   ‘⁄ MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   ‘⁄ System.Windows.Threading.DispatcherOperation.InvokeImpl()
   ‘⁄ System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   ‘⁄ System.Threading.ExecutionContext.runTryCode(System.Object)
   ‘⁄ System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
   ‘⁄ System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   ‘⁄ System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   ‘⁄ System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   ‘⁄ System.Windows.Threading.DispatcherOperation.Invoke()
   ‘⁄ System.Windows.Threading.Dispatcher.ProcessQueue()
   ‘⁄ System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   ‘⁄ MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   ‘⁄ MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   ‘⁄ System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   ‘⁄ MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   ‘⁄ System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   ‘⁄ MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   ‘⁄ MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   ‘⁄ System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   ‘⁄ System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   ‘⁄ System.Windows.Threading.Dispatcher.Run()
   ‘⁄ System.Windows.Application.RunDispatcher(System.Object)
   ‘⁄ System.Windows.Application.RunInternal(System.Windows.Window)
   ‘⁄ System.Windows.Application.Run(System.Windows.Window)
   ‘⁄ System.Windows.Application.Run()
   ‘⁄ FooSoftware.App.Main()


”–πÿ∏¸∂‡–≈œ¢£¨«Î≤Œ‘ƒ‘⁄ http://go.microsoft.com/fwlink/events.asp µƒ∞Ô÷˙∫Õ÷ß≥÷÷––ƒ°£

есть XamlParseException, из-за которого мое приложение не запускается на XP Window Machine. Что происходит?

33
задан KMC 3 July 2012 в 06:06
поделиться