C #: Nie można załadować typów z złożenia
Po dodaniu Lucene.net i Lucene.net Contrib do C # MVC3, otrzymuję poniższy komunikat po pierwszym udanym uruchomieniu. Po otrzymaniu tego błędu muszę całkowicie wyczyścić pliki C: Użytkownicy Moje dane Lokalne tymczasowe pliki ASP.NET, zanim będę mógł ponownie uruchomić projekt.
Próbowałem ręcznie usunąć pliki Lucene (w tym odwołania w moim projekcie) i ponownie je zainstalować - zarówno w NuGet, jak i ręcznie - ale zawsze jest to ta sama sytuacja; po jednorazowym uruchomieniu projektu pojawiają się następujące błędy:
Uwaga: Contrib.Regex jest częścią Lucene.net Contrib.
<code>Server Error in '/' Application. Could not load types from assembly Contrib.Regex, Version=2.9.4.0, Culture=neutral, PublicKeyToken=85089178b9ac3181, errors: Exception: System.IO.FileLoadException: Could not load file or assembly 'Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181' === Pre-bind state information === LOG: User = rcw7\Me LOG: DisplayName = Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181 (Fully-specified) LOG: Appbase = file:///C:/Development/Projects/Foobar/Foobar/ LOG: Initial PrivatePath = C:\Development\Projects\Foobar\Foobar\bin Calling assembly : Contrib.Regex, Version=2.9.4.0, Culture=neutral, PublicKeyToken=85089178b9ac3181. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Development\Projects\Foobar\Foobar\web.config LOG: Using host configuration file: C:\Users\Me\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181 LOG: Attempting download of new URL file:///C:/Users/Me/AppData/Local/Temp/Temporary ASP.NET Files/root/e9b4cfa4/edfa73f8/Lucene.Net.DLL. WRN: Comparing the assembly name resulted in the mismatch: Revision Number ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. Exception: System.IO.FileLoadException: Could not load file or assembly 'Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181' </code>
Pełne wyjście tutaj:http://pastebin.com/Vbu4VK7B
Początkowo myślałem, że jest to problem lokalny w moim środowisku programistycznym, ale po przebudowie i skopiowaniu projektu na nasz serwer mam te same błędy.
Jakieś sugestie, jak to pokonać? :-)