I am getting this error at runtime when running the application for the specific page. I have been trying to fix this for few days now and tried several alternatives from various stackoverlow or other similar links but couldn't make it work yet. Below is a brief explanation of the setup we have here:
- The Asp.net solution is made up of several projects. Few of the projects are for Yet Another Forum (YAF) application which is embeded within the solution (The error page is based on one of these projects). The application is based on Sitecore CMS (although this might not be the problem) On IIS7 we have one website which has 2 applications attached in the Application Pool, one for the main project and one for the YAF.
What I have tried so far
In IIS7 I've clicked Recycling under the Application Pools application. I've restarted the website and each application.
In VS2013 I've deleted all the bin and obj folders from all the projects and rebuilt the solution.
I've deleted the windows 'temp' folder and also %nuget/local
folders.
I reset the nuget package withing the solution.
I've run Visual Studio command prompt gacutil -l
command and couldn't find any reference to Microsoft.Practices.ServiceLocation
.
In packages folder within the solution tree I found CommonServiceLocator.1.0
and CommonServiceLocator.3.0
. So I manually added versioin 2.0 - didn't help.
Any ideas please where else to look as it's very frustrating in trying to fix this for several days now?
Error Message
Blockquote Server Error in '/forum' Application. Could not load file or assembly 'Microsoft.Practices.ServiceLocation' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Blockquote WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. Stack Trace: [FileLoadException: Could not load file or assembly 'Microsoft.Practices.ServiceLocation' 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 'Microsoft.Practices.ServiceLocation, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +234 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +108 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +25 System.Reflection.Assembly.Load(String assemblyString) +34 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49
UPDATE: The only thing that I haven't carried out on checking was to use FusLogVw from the suggested forum above. I've managed to run that as well finally and the outcomes are: When I select 'log bind failures to disk' option it doesn't produce any logs The only time it produces the logs is when 'Log all binds to disk' is selected. It produces two folders, Default and NativeImage. Under NativeImage folder I am getting a number of log entries with error messages in them. Unfortunately, I can't understand what's going on there as there are no descriptions on error sections.
Any ideas on what else should I look into or how to read/understand the log entries? I would have uploaded here, but I don't think I can.