In meinem WPF-Anwendung, erhalte ich die folgende Ausnahme beim Start:"Die Datei oder Baugruppe 'PresentationUI.Aero2' oder eine ihrer Abhängigkeiten konnte nicht geladen werden." Warum nicht?
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly
'PresentationUI.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
or one of its dependencies.
EDIT: Mit Fusion log, erhalte ich ein wenig mehr wertvolle Informationen über den Call-Stack:
LOG: DisplayName = PresentationUI.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///[...]/bin/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = EngideskLauncher.vshost.exe
Calling assembly : PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: [...]\bin\Debug\EngideskLauncher.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: PresentationUI.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///[...]/bin/Debug/PresentationUI.Aero2.DLL.
LOG: Attempting download of new URL file:///file:///[...]/bin/Debug/PresentationUI.Aero2/PresentationUI.Aero2.DLL.
LOG: Attempting download of new URL file:///file:///[...]/bin/Debug/PresentationUI.Aero2.EXE.
LOG: Attempting download of new URL file:///file:///[...]/bin/Debug/PresentationUI.Aero2/PresentationUI.Aero2.EXE.
LOG: All probing URLs attempted and failed.
Was finde ich seltsam, ist, dass die aufrufende Assembly ist PresentationFramework
, die eine .NET-Framework-Assembly ist, offensichtlich. Eine .NET Framework-Assembly würde keine Assembly aufrufen, die keine .NET Framework-Assembly ist. Wie auch immer, ich kann nirgends eine PresentationUI.Aero2.DLL finden und nicht einmal Google scheint davon etwas zu wissen?
Irgendwelche Ideen?
Zusätzliche Informationen:
- .NET Framework 4.0
- Windows-8,1
Aktivieren Sie das Fusionsprotokoll oder verwenden Sie ProcMon, um herauszufinden, welche Datei es zu laden versucht. Siehe [Wie Debuggen "Laufzeitfehler von Datei oder Assembly nicht geladen werden können?] (Http://stackoverflow.com/questions/4602912/how-to-debug-could-not-load-file-or-assembly-runtime- Fehler). – CodeCaster
Hi CodeCaster, danke für den Hinweis. Ich würde mich freuen, wenn Sie mir eine kurze Rückmeldung zum Output geben könnten. Hast du eine Idee? – Marc
Hallo Hans, der von Ihnen erwähnte Ordner enthält 'PresentationFramework.Aero2.DLL', aber nicht' PresentationUI.Aero2.DLL'. Was meinst du damit, "wie du 4,0 auf dieser Maschine hast, ist völlig unerforschbar"? Ich kann mich nicht erinnern, irgendeine Art von Vorschlaghammer zu benutzen;) Danke für Ihre Hilfe! – Marc