Ricevo un'eccezione di caricamento file (prima possibilità) al metodo InitializeComponent
o il debugger si interrompe nell'attributo x:Class
della xaml-root di più controlli utente WPF. Tutto funziona bene nonostante il fatto che le eccezioni rallentino molto la navigazione.FileLoadException A InitializeComponent o x: Class =
Questo è il messaggio di eccezione:
Impossibile caricare il file o l'assembly 'Company.Solution.UserInterface, Version = 0.1.5568.25577, Culture = neutral, PublicKeyToken = 45069ab0c15881ce' o una delle sue dipendenze. La definizione manifest di assembly individuato non corrisponde al riferimento all'assembly. (Eccezione da HRESULT: 0x80131040)
Questo è il log Fusion:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable D:\Development\Product\Main\src\Company.Product \bin\Debug\Product.vshost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Company.Product .UserInterface, Version=0.1.5568.25577, Culture=neutral, PublicKeyToken=45069ab0c15881ce
(Fully-specified)
LOG: Appbase = file:///D:/Development/Product/Main/src/Company.Product/bin/Debug/
LOG: Initial PrivatePath = NULL
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: D:\Development\Product \Main\src\Company.Product \bin\Debug\Product .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: Company.Product .UserInterface, Version=0.1.5568.25577, Culture=neutral, PublicKeyToken=45069ab0c15881ce
LOG: Attempting download of new URL file:///D:/Development/Product/Main/src/Company.Product/bin/Debug/Company.Product.UserInterface.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
mia struttura del progetto ha un progetto principale che fa riferimento a un progetto di modulo (in cui si verifica l'eccezione). Il modulo stesso progetto fa riferimento al progetto che è l'obiettivo del suddetto sondaggio "Company.Product.UserInterface.dll" che contiene alcune risorse/controlli/stili/primitive/convertitori e così via.
Come posso liberare il FileLoadExceptions
?
Un altro più completo Fusion-log:
=== Pre-bind state information ===
LOG: DisplayName = Company.Product.UserInterface, Version=0.1.5577.18122, Culture=neutral, PublicKeyToken=45069ab0c15881ce
(Fully-specified)
LOG: Appbase = file:///D:/Development/Product/Main/src/Company.Product/bin/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Product.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: D:\Development\Product\Main\src\Company.Product\bin\Debug\Product.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: Company.Product.UserInterface, Version=0.1.5577.18122, Culture=neutral, PublicKeyToken=45069ab0c15881ce
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///D:/Development/Product/Main/src/Company.Product/bin/Debug/Company.Product.UserInterface.DLL.
LOG: Assembly download was successful. Attempting setup of file: D:\Development\Product\Main\src\Company.Product\bin\Debug\Company.Product.UserInterface.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Company.Product.UserInterface, Version=0.1.5577.18123, Culture=neutral, PublicKeyToken=45069ab0c15881ce
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: The assembly reference did not match the assembly definition found.
ERR: Run-from-source setup phase failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Al momento l'eccezione si verifica la versione dell'assembly nel SolutionExplorer riferimento è 0.1.5577.18123 (in tutte le soluzioni che fanno riferimento al ..UserInterface.dll. non ho idea di chi guarda in alto 0.1.5577.18122, questa versione ha mai esiste)
Se corro una nuova ricostruzione tutto quello che ottiene lo stesso errore, Fusion cerca la (non ho mai avuto questo numero di versione):
LOG: Post-policy reference: Company.Product.UserInterface, Version=0.1.5577.18465, Culture=neutral, PublicKeyToken=45069ab0c15881ce
la versione trovata è:
LOG: Assembly Name is: Company.Product.UserInterface, Version=0.1.5577.18466, Culture=neutral, PublicKeyToken=45069ab0c15881ce
Visual Studio Version è il 2013 Ultimate e il progetto è costruire sulle .net4.5 e le versioni di montaggio sono auto generato nel processo di generazione. Ho caricato il registro di build to tinyupload perché era troppo grande. È possibile trovare il registro Fusion completo here at pastebin.
Hai controllato il tuo log Fusion? –
UserInterface.dll fa riferimento solo a un progetto? – tchrikch
No UserInterface è utilizzato da 3 progetti, che sono quindi tutti riuniti dalla radice delle dipendenze. Posso postare il grafico delle dipendenze se questo aiuta – Console