Could not load file or assembly 'Microsoft.AspNet.Identity.EntityFramework' or one of its dependencies. Strong name signature could not be verified

2

I know this question has been asked several times and i saw some solutions here on Stackoverflow, but after trying every possible problem solving tips out i still could not get a hang of my error. i tried to uninstall from my Package Manager but it seems i have 2types of .Net Entity Framework in one project. (4.5 and 6.0). After trying to uninstall either of them it says: Unable to uninstall 'EntityFramework 6.0.2' because 'EntityFramework.Extras 0.9.4.0, EntityFramework.SqlServerCompact 6.0.2' depend on it. Likewise the 4.5. Please any suggestion would be appreciated.thanks

Server Error in '/' Application. Could not load file or assembly 'Microsoft.AspNet.Identity.EntityFramework' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 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 'Microsoft.AspNet.Identity.EntityFramework' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

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 'Microsoft.AspNet.Identity.EntityFramework' could not be loaded.

=== Pre-bind state information === LOG: DisplayName = Microsoft.AspNet.Identity.EntityFramework (Partial) WRN: Partial binding information was supplied for an assembly: WRN: Assembly Name: Microsoft.AspNet.Identity.EntityFramework | 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:/users/sarah/documents/visual studio 2013/Projects/WingtipToys/WingtipToys/ LOG: Initial PrivatePath = c:\users\sarah\documents\visual studio 2013\Projects\WingtipToys\WingtipToys\bin Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: c:\users\sarah\documents\visual studio 2013\Projects\WingtipToys\WingtipToys\web.config LOG: Using host configuration file: C:\Users\Sarah\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/Sarah/AppData/Local/Temp/Temporary ASP.NET Files/root/89fcbef3/584b953e/Microsoft.AspNet.Identity.EntityFramework.DLL. LOG: Attempting download of new URL file:///C:/Users/Sarah/AppData/Local/Temp/Temporary ASP.NET Files/root/89fcbef3/584b953e/Microsoft.AspNet.Identity.EntityFramework/Microsoft.AspNet.Identity.EntityFramework.DLL. LOG: Attempting download of new URL file:///c:/users/sarah/documents/visual studio 2013/Projects/WingtipToys/WingtipToys/bin/Microsoft.AspNet.Identity.EntityFramework.DLL. LOG: Using application configuration file: c:\users\sarah\documents\visual studio 2013\Projects\WingtipToys\WingtipToys\web.config LOG: Using host configuration file: C:\Users\Sarah\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: Microsoft.AspNet.Identity.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 ERR: Failed to complete setup of assembly (hr = 0x80131045). Probing terminated.

Stack Trace:

[FileLoadException: Could not load file or assembly 'Microsoft.AspNet.Identity.EntityFramework' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]

[FileLoadException: Could not load file or assembly 'Microsoft.AspNet.Identity.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)] 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.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +16 System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.AspNet.Identity.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +752
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +218 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +285
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.AspNet.Identity.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9915300
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18447

c#
asp.net
.net
entity-framework
asked on Stack Overflow Mar 13, 2014 by user3282967 • edited Mar 13, 2014 by Soner Gönül

1 Answer

0

Get rid of the references to EntityFramework.Extras 0.9.4.0 and EntityFramework.SqlServerCompact 6.0.2 first and then uninstall/reinstall EF through nuget.

answered on Stack Overflow Mar 14, 2014 by Neil Smith

User contributions licensed under CC BY-SA 3.0