WPF - XamlParseException

  • Allgemein

Es gibt 6 Antworten in diesem Thema. Der letzte Beitrag () ist von AliveDevil.

    WPF - XamlParseException

    Mah, ich wieder.
    XAML regt mich auf.
    Kurz und bündig:

    Quellcode

    1. System.Windows.Markup.XamlParseException wurde nicht behandelt.
    2. Message=Die Datei oder Assembly "ProjektName, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
    3. Source=PresentationFramework
    4. LineNumber=0
    5. LinePosition=0
    6. StackTrace:
    7. bei System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
    8. bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
    9. bei System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
    10. bei System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
    11. bei System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
    12. bei System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
    13. bei System.Windows.Application.DoStartup()
    14. bei System.Windows.Application.<.ctor>b__1(Object unused)
    15. bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    16. bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
    17. bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
    18. bei System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
    19. bei System.Threading.ExecutionContext.runTryCode(Object userData)
    20. bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    21. bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    22. bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    23. bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    24. bei System.Windows.Threading.DispatcherOperation.Invoke()
    25. bei System.Windows.Threading.Dispatcher.ProcessQueue()
    26. bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    27. bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    28. bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    29. bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    30. bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
    31. bei System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
    32. bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    33. bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    34. bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    35. bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
    36. bei System.Windows.Application.RunDispatcher(Object ignore)
    37. bei System.Windows.Application.RunInternal(Window window)
    38. bei System.Windows.Application.Run(Window window)
    39. bei System.Windows.Application.Run()
    40. bei ProjektName.App.Main() in C:\Users\AliveDevil\Documents\Visual Studio 2010\Projects\ProjektName\ProjektName\obj\x86\Debug\App.g.cs:Zeile 0.
    41. bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    42. bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    43. bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    44. bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    45. bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    46. bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    47. bei System.Threading.ThreadHelper.ThreadStart()
    48. InnerException: System.IO.FileLoadException
    49. Message=Die Datei oder Assembly "ProjektName, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
    50. Source=mscorlib
    51. FileName=ProjektName, PublicKeyToken=b03f5f7f11d50a3a
    52. FusionLog==== Zustandsinformationen vor Bindung ===
    53. LOG: Benutzer = joeran-Main\AliveDevil
    54. LOG: DisplayName = ProjektName, PublicKeyToken=b03f5f7f11d50a3a
    55. (Partial)
    56. WRN: Für eine Assembly wurden partielle Bindungsinformationen bereitgestellt:
    57. WRN: Assemblyname: ProjektName, PublicKeyToken=b03f5f7f11d50a3a | Domänen-ID: 1
    58. WRN: Eine partielle Bindung tritt auf, wenn nur ein Teil des Assemblyanzeigenamens bereitgestellt wird.
    59. WRN: Dies führt möglicherweise dazu, dass die Sammelmappe eine falsche Assembly lädt.
    60. WRN: Geben Sie die Textidentität der Assembly mit allen Einzelheiten an.
    61. WRN: Dazu gehören der einfache Name, die Version und Kultur und das öffentliche Schlüsseltoken.
    62. WRN: Weitere Informationen und allgemeine Lösungen für dieses Problem finden Sie im Whitepaper unter "http://go.microsoft.com/fwlink/?LinkId=109270".
    63. LOG: Appbase = file:///C:/Users/AliveDevil/Documents/Visual Studio 2010/Projects/ProjektName/ProjektName/bin/Debug/
    64. LOG: Ursprünglicher PrivatePath = NULL
    65. Aufruf von Assembly : PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
    66. ===
    67. LOG: Diese Bindung startet im default-Load-Kontext.
    68. LOG: Die Anwendungskonfigurationsdatei wird verwendet: C:\Users\AliveDevil\Documents\Visual Studio 2010\Projects\ProjektName\ProjektName\bin\Debug\ProjektName.vshost.exe.Config
    69. LOG: Die Hostkonfigurationsdatei wird verwendet:
    70. LOG: Die Computerkonfigurationsdatei von C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config wird verwendet.
    71. LOG: Die Richtlinie wird derzeit nicht auf den Verweis angewendet (private, benutzerdefinierte, teilweise oder pfadbasierte Assemblybindung)
    72. LOG: Download von neuem URL file:///C:/Users/AliveDevil/Documents/Visual Studio 2010/Projects/ProjektName/ProjektName/bin/Debug/ProjektName.DLL.
    73. LOG: Download von neuem URL file:///C:/Users/AliveDevil/Documents/Visual Studio 2010/Projects/ProjektName/ProjektName/bin/Debug/ProjektName/ProjektName.DLL.
    74. LOG: Download von neuem URL file:///C:/Users/AliveDevil/Documents/Visual Studio 2010/Projects/ProjektName/ProjektName/bin/Debug/ProjektName.EXE.
    75. WRN: Der Vergleich des Assemblynamens führte zum Konflikt: PUBLIC KEY TOKEN.
    76. ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x80131040). Die Suche wurde beendet.
    77. StackTrace:
    78. bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    79. bei System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    80. bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
    81. bei System.Reflection.Assembly.Load(AssemblyName assemblyRef)
    82. bei System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly(BamlAssembly bamlAssembly)
    83. bei System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType(BamlType bamlType)
    84. bei System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
    85. bei System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
    86. bei System.Windows.Baml2006.Baml2006Reader.Process_ElementStart()
    87. bei System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
    88. bei System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
    89. bei System.Windows.Baml2006.Baml2006Reader.Read()
    90. bei System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
    91. bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
    92. InnerException:

    Möcht mir jemand das erklären? Hab nämlich exakt keine Ahnung, warum der mir den Fehler wirft. Hab letztens das Async CTP v3 installiert, kann aber eig. nicht daran liegen.
    Projekt:

    App.config nur damit ich SQLite nutzen kann.

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „AliveDevil“ ()

    Download wird vmtl. der vshost sein, da der ja im Debugging hängt.
    Setup..vmtl. nichts, hab jdfs. keins gemacht.
    Zu dem XamlParsing: nein keine Ahnung.
    Das is betreffender Code (wurde mir irwann ma angezeigt)

    Brainfuck-Quellcode

    1. #pragma checksum "..\..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1B54D3C43DDC4E016ED2B7FB1DEE771F"
    2. //------------------------------------------------------------------------------
    3. // <auto-generated>
    4. // Dieser Code wurde von einem Tool generiert.
    5. // Laufzeitversion:4.0.30319.544
    6. //
    7. // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
    8. // der Code erneut generiert wird.
    9. // </auto-generated>
    10. //------------------------------------------------------------------------------
    11. using System;
    12. using System.Diagnostics;
    13. using System.Windows;
    14. using System.Windows.Automation;
    15. using System.Windows.Controls;
    16. using System.Windows.Controls.Primitives;
    17. using System.Windows.Data;
    18. using System.Windows.Documents;
    19. using System.Windows.Ink;
    20. using System.Windows.Input;
    21. using System.Windows.Markup;
    22. using System.Windows.Media;
    23. using System.Windows.Media.Animation;
    24. using System.Windows.Media.Effects;
    25. using System.Windows.Media.Imaging;
    26. using System.Windows.Media.Media3D;
    27. using System.Windows.Media.TextFormatting;
    28. using System.Windows.Navigation;
    29. using System.Windows.Shapes;
    30. using System.Windows.Shell;
    31. namespace ProjektName{
    32. /// <summary>
    33. /// App
    34. /// </summary>
    35. [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
    36. public partial class App : System.Windows.Application {
    37. /// <summary>
    38. /// InitializeComponent
    39. /// </summary>
    40. [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    41. public void InitializeComponent() {
    42. #line 4 "..\..\..\App.xaml"
    43. this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
    44. #line default
    45. #line hidden
    46. }
    47. /// <summary>
    48. /// Application Entry Point.
    49. /// </summary>
    50. [System.STAThreadAttribute()]
    51. [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    52. public static void Main() {
    53. ProjektName.App app = new ProjektName.App();
    54. app.InitializeComponent();
    55. app.Run();
    56. }
    57. }
    58. }

    Da sehe ich jetz nichts besonderes, kann auch gern das .csproj (also den Inhalt) hier posten.

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „AliveDevil“ ()