2017-01-28 1 views
0

Ich habe kürzlich von NEST 1.9 auf NEST 2.3 aktualisiert. Aus irgendeinem Grund haben die Baugruppen in .NET nicht aktualisiert worden und suchen noch ElasticSearch.net Paket Elasticsearch.Net, Version=1.0.0.0Die Datei 'Elasticsearch.Net' oder eine ihrer Abhängigkeiten konnte nicht geladen werden

Ich habe versucht zu deinstallieren dann ElasticSearch.net Installation und dann NEST nach dem ich Visual Studio 4.6 neu gestartet. Ich verwende .NET 45.

Could not load file or assembly 'Elasticsearch.Net' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Elasticsearch.Net' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Elasticsearch.Net' could not be loaded.

=== Pre-bind state information === LOG: DisplayName = Elasticsearch.Net (Partial) WRN: Partial binding information was supplied for an assembly: WRN: Assembly Name: Elasticsearch.Net | Domain ID: 2 WRN: A partial bind occurs when only part of the assembly display name is provided. WRN: This might result in the binder loading an incorrect assembly. WRN: It is recommended to provide a fully specified textual identity for the assembly, WRN: that consists of the simple name, version, culture, and public key token. WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. LOG: Appbase = file:///C:/wht/We Heart Tours/wht/ LOG: Initial PrivatePath = C:\wht\We Heart Tours\wht\bin Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\wht\We Heart Tours\wht\web.config LOG: Using host configuration file: C:\Users\amocanu\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/Users/amocanu/AppData/Local/Temp/Temporary ASP.NET Files/root/412255cb/fee8480d/Elasticsearch.Net.DLL. LOG: Attempting download of new URL file:///C:/Users/amocanu/AppData/Local/Temp/Temporary ASP.NET Files/root/412255cb/fee8480d/Elasticsearch.Net/Elasticsearch.Net.DLL. LOG: Attempting download of new URL file:///C:/wht/We Heart Tours/wht/bin/Elasticsearch.Net.DLL. LOG: Using application configuration file: C:\wht\We Heart Tours\wht\web.config LOG: Using host configuration file: C:\Users\amocanu\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Redirect found in application configuration file: 2.0.0.0 redirected to 1.0.0.0. LOG: Post-policy reference: Elasticsearch.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d LOG: Attempting download of new URL file:///C:/Users/amocanu/AppData/Local/Temp/Temporary ASP.NET Files/root/412255cb/fee8480d/Elasticsearch.Net.DLL. LOG: Attempting download of new URL file:///C:/Users/amocanu/AppData/Local/Temp/Temporary ASP.NET Files/root/412255cb/fee8480d/Elasticsearch.Net/Elasticsearch.Net.DLL. LOG: Attempting download of new URL file:///C:/wht/We Heart Tours/wht/bin/Elasticsearch.Net.DLL. WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Stack Trace:

[FileLoadException: Could not load file or assembly 'Elasticsearch.Net' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]

[FileLoadException: Could not load file or assembly 'Elasticsearch.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]

+0

Wir hatten dieses Problem, wenn wir verpasste Newtonsoft.Json dll. Prüfen Sie. – Backs

+0

@Backs wie soll ich fortfahren? Ich verstehe Ihren Vorschlag nicht ganz. Danke für deine Antwort! Sehr geschätzt. Warten Sie, dass Sie auch eine höhere Version von Newtonsoft installieren? Welche Version soll ich bekommen? – Adrian

Antwort

1

Falls es jemand hilft,
die Lösung Web.config zu bearbeiten und ändern

<assemblyIdentity name="Elasticsearch.Net" publicKeyToken="96c599bbe3e70f5d" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="1.0.0.0" /> 

zu

<assemblyIdentity name="Elasticsearch.Net" publicKeyToken="96c599bbe3e70f5d" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> 
+0

Ich schätze, Sie können die verbindliche Weiterleitung insgesamt entfernen; Sie ** wollen nicht die Version 1.x wie zuvor verwenden und es sollte keine Bindung zu 2.x geben –

Verwandte Themen