C#の - .NETアプリケーションはXamlParseExceptionを開始し、受信に失敗しました

私は私の開発用PC(Windows 7の)の上に設置することができ、アプリケーションと仕事を書きました。

  • 開発環境:Windows 7のVS2010 WPF C#と  .NET 4と  .NET 3.5がインストールさ

他のクライアントコンピュータ(XP SP3,2および1)では、エラーなしでインストールされますが、起動できません。タスクマネージャでは、私は一時メモリによって占有されていたメモリを閉じる前にアプリケーションを見ることができます。

私は確信している、次の方法で私の開発PCと様々なクライアントのXPマシン間のNET 3.5の整合性:

  • アプリケーション・ターゲット  .NET 3.5(または  3.5顧客プロファイル  )
  • VS2010インストーラを使用して、展開しますように、ターゲットの状態を起動し  、.NET 3.5
  • デバッグアプリケーションとインストーラのプロジェクトの間に、。NET互換性に関するエラーなし

次の警告を取得します。

 ¬º˛¿‡–Õ: ¥ÌŒÛ
 ¬º˛¿¥‘¥:. 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 µƒ∞Ô÷˙∫Õ÷ß≥÷÷––ƒ°£

私はXPマシン上のアプリケーションウィンドウを起動することはできません。原因XamlParseExceptionがあります。最終的にはそれがどのようにでしょうか?

時間:17年5月7日著者:KMCの  合計18のGeの回答

0  0

XamlParseException アプリケーションの起動時に問題が発生した場合、一般的なエラーが発生しています。私はあなたが何が起こったのかを最終的に追跡するために、アプリケーションの起動コードを変更することを示唆していると何を得るために、XamlParseExceptionだけではなく、また、あなたが問題の根本を決定するのを助けるために内部の異常を持っている必要があります。次に例を示します。

namespace WpfApplication1
{
///<summary>
///Interaction logic for App.xaml
///</summary>
 public partial class App : Application
 {
 protected override void OnStartup(StartupEventArgs e)
 {
//hook on error before app really starts
 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
 base.OnStartup(e);
 }
 void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
//put your tracing or logging code here (I put a message box as an example)
 MessageBox.Show(e.ExceptionObject.ToString());
 }
 }
}
公開された11元の記事 ウォン称賛16 ビュー90000 +

おすすめ

転載: blog.csdn.net/orange2211/article/details/80233923