La mia applicazione Web ASP.NET MVC3 funzionava correttamente. ma quando ho riavviato il pc e poi cercando di aggiornare l'applicazione in MS VS 2010 mostra un errore durante l'esecuzione dell'applicazione:Impossibile caricare il file o l'assembly 'EntityFramework' o una delle sue dipendenze
Could not load file or assembly 'EntityFramework' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Descrizione:
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.
Dettagli eccezione: sistema .IO.FileLoadException: impossibile caricare il file o l'assembly 'EntityFramework' o una delle sue dipendenze. Il parametro non è corretto. (Eccezione da HRESULT: 0x80070057 (E_INVALIDARG)) Errore
Fonte:
un'eccezione non gestita è stata generata durante l'esecuzione della richiesta Web corrente. Le informazioni relative all'origine e alla posizione dell'eccezione possono essere identificate utilizzando la traccia dello stack di eccezioni di seguito.
Traccia caricamento assieme: le seguenti informazioni possono essere utili per determinare il motivo per cui non è stato possibile caricare l''EntityFramework' dell'assieme.
WRN: la registrazione del binding di assiemi è disattivata. Per abilitare la registrazione degli errori di binding dell'assieme, impostare il valore del registro [HKLM \ Software \ Microsoft \ Fusion! EnableLog] (DWORD) su 1. Nota: esiste una penalità legata alle prestazioni associata alla registrazione degli errori di binding dell'assieme. Per disattivare questa funzione, rimuovere il valore di registro [HKLM \ Software \ Microsoft \ Fusion! EnableLog].
dello stack:
[FileLoadException: Could not load file or assembly 'EntityFramework' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
[FileLoadException: Could not load file or assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +591
[HttpException (0x80004005): Could not load file or assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8946484
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258
Poi ho cancellare tutti i file di Windows temp e file temporaneo ASP.NET quindi eseguire nuovamente l'applicazione. ma la situazione non è migliorata. Potresti per favore aiutarmi a risolvere questo. Grazie.
grazie. sta lavorando adesso. – arefinsami
Non ero in grado di rimuoverlo a causa delle dipendenze, ma una reinstallazione ha aiutato: Update-Package -reinstall EntityFramework –