Ich bekomme eine Dateilader-Ausnahme (erste Chance) bei der InitializeComponent
-Methode oder der Debugger bricht bei der x:Class
Attribut der XAML-Root von mehreren WPF-Benutzersteuerelementen. Alles funktioniert gut, trotz der Tatsache, dass die Ausnahmen die Navigation sehr verlangsamen.FileLoadException bei InitializeComponent oder X: Class =
Dies ist die Ausnahmemeldung:
konnte nicht Datei oder Assembly 'Company.Solution.UserInterface, Version = 0.1.5568.25577, Culture = neutral, PublicKeyToken = 45069ab0c15881ce' laden oder eine ihrer Abhängigkeiten. Die Manifestdefinition der lokalisierten Assembly stimmt nicht mit der Assemblyreferenz überein. (Ausnahme von HRESULT: 0x80131040)
Dies ist die Fusion log:
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.
My Projektstruktur hat eine Wurzel-Projekt, das ein Modul Projekt verweist (in dem die Ausnahme auftritt). Das Modulprojekt selbst verweist auf das Projekt, das Ziel der oben genannten Sondierung "Company.Product.UserInterface.dll" ist, die einige Ressourcen/Steuerelemente/Stile/Primitive/Konverter usw. enthält. Wie kann ich die FileLoadExceptions
loswerden?
Eine weitere vollständigere 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.
Im Moment ist die Ausnahme, die Version der Assembly in der SolutionExplorer verwiesen auftritt, ist 0.1.5577.18123 (in allen Lösungen, die die ..UserInterface.dll verweisen. ich habe keine Ahnung, wer 0.1.5577.18122 nachschlägt, ist diese Version gab es nie)
Wenn ich ein neues laufen wieder aufzubauen alles, was ich den gleichen Fehler, sieht Fusion für (ich nie diese Versionsnummer hatte):
LOG: Post-policy reference: Company.Product.UserInterface, Version=0.1.5577.18465, Culture=neutral, PublicKeyToken=45069ab0c15881ce
die Version gefunden ist:
LOG: Assembly Name is: Company.Product.UserInterface, Version=0.1.5577.18466, Culture=neutral, PublicKeyToken=45069ab0c15881ce
Visual Studio Version ist 2013 Ultimate und das Projekt ist auf .net4.5 bauen und die Montage Versionen werden automatisch in den Build-Prozess erzeugt. Ich habe das Build Log to tinyupload hochgeladen, da es zu groß war. Das vollständige Fusionsprotokoll finden Sie unter here at pastebin.
Haben Sie Ihr Fusionsprotokoll überprüft? –
Wird die UserInterface.dll nur von einem Projekt referenziert? – tchrikch
Nein das UserInterface wird von 3 Projekten verwendet, die dann alle durch den Abhängigkeitsstamm zusammengefügt werden. Ich kann das Abhängigkeitsdiagramm veröffentlichen, wenn das hilft – Console