Nella mia applicazione WPF, ottengo la seguente eccezione all'avvio:"Impossibile caricare il file o l'assembly 'PresentationUI.Aero2' o una delle sue dipendenze." Perchè no?
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: Utilizzando registro fusione, ho un po 'di informazioni più prezioso di stack di chiamate:
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.
quello che trovo strano, è che l'assembly di chiamata è PresentationFramework
, che è un assembly di .NET framework, ovviamente. Un assembly di .NET Framework non chiama un assembly che non è un assembly di .NET Framework. Ad ogni modo, non riesco a trovare PresentationUI.Aero2.DLL da nessuna parte e nemmeno Google sembra sapere nulla a riguardo ??
Qualche idea?
Ulteriori informazioni:
- .NET Framework 4.0
- di Windows 8,1
Abilitare il registro di fusione o utilizzare ProcMon per individuare il file che tenta di caricare. Vedi [Come eseguire il debug "Errori di runtime" Impossibile caricare file o assembly?] (Http://stackoverflow.com/questions/4602912/how-to-debug-could-not-load-file-or-assembly-runtime- errori). – CodeCaster
Ciao CodeCaster, grazie per il suggerimento. Sarei felice, se potessi darmi un feedback breve sull'output. Hai qualche idea? – Marc
Ciao Hans, la cartella che hai menzionato contiene 'PresentationFramework.Aero2.DLL' ma non' PresentationUI.Aero2.DLL'. Cosa intendi con "come hai ottenuto 4.0 su quella macchina è del tutto ingiustificabile"? Non ricordo di aver usato alcun tipo di mazza da slitta;) Grazie per il tuo aiuto! – Marc