Error "Unable to load file or Assembly"

Asked

Viewed 4,931 times

0

Any help with the error below?

Could not load file or Assembly 'Html5datalist-DESKTOP-P3666CV' or one of its dependencies. The definition of the localized Assembly manifest does not correspond to the Assembly reference.

LOG:

=== Pre-association status information === LOG: Displayname = Html5datalist-DESKTOP-P3666CV (Partial)

AVI: partial association information has been provided for an Assembly:

AVI: Assembly Name: Html5datalist-DESKTOP-P3666CV | Domain ID: 2

AVI: A partial association occurs when only part of the Assembly display name is provided.

AVI: This can cause the associator to load an incorrect Assembly.

AVI: It is recommended to provide a fully specified textual identity for Assembly,

AVI: consisting of simple name, version, culture and public key token.

AVI: See the white paper http://go.microsoft.com/fwlink/? Linkid=109270 for more information and common solutions to the problem.

LOG: Appbase = file://D:/Onedrive/Visualstudio2017/006-Html5datalist_fdfedfontes/Html5datalist/

LOG: Initial privatepath = D: Onedrive Visualstudio2017 006-Html5datalist_fdfedsources Html5datalist bin Calling Assembly: (Unknown).

LOG: this association starts in the default upload context.

LOG: using application configuration file: D: Onedrive Visualstudio2017 006-Html5datalist_fdfedfonts Html5datalist web.config

LOG: using host configuration file: C: Users itaro Documents Iisexpress config aspnet.config

LOG: using C machine configuration file: Windows Microsoft.NET Framework v4.0.30319 config machine.config.

LOG: the policy is not being applied for reference at this time (particular, custom, partial or local based Assembly association).

LOG: trying to download new URL file://C:/Users/itaro/Appdata/Local/Temp/Temporary ASP.NET Files/vs/d73f5939/aadb14e5/Html5datalist-DESKTOP-P3666CV.DLL.

LOG: trying to download new URL file://C:/Users/itaro/Appdata/Local/Temp/Temporary ASP.NET Files/vs/d73f5939/aadb14e5/Html5datalist-DESKTOP-P3666CV/Html5datalist-DESKTOP-P3666CV.DLL.

LOG: trying to download new URL file://D:/Onedrive/Visualstudio2017/006-Html5datalist_fdfedfontes/Html5datalist/bin/Html5datalist-DESKTOP-P3666CV.DLL.

AVI: Assembly name comparison resulted in incompatibility: NAME

ERR: failed to complete Assembly configuration (hr = 0x80131040). Probing terminated.

Stack tracking

[Fileloadexception: Could not load file or Assembly 'Html5datalist-DESKTOP-P3666CV' or one of its dependencies. The definition of the localized Assembly manifest does not correspond to the Assembly reference. (HRESULT exception: 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.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +36

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) +21

System.Reflection.Assembly.Load(String assemblyString) +28

System.Web.Configuration.CompilationSection.Loadassemblyhelper(String assemblyName, Boolean starDirective) +38

[Configurationerrorsexception: Could not load file or Assembly 'Html5datalist-DESKTOP-P3666CV' or one of its dependencies. The definition of the localized Assembly manifest does not correspond to the Assembly reference. (HRESULT exception: 0x80131040)]

System.Web.Configuration.CompilationSection.Loadassemblyhelper(String assemblyName, Boolean starDirective) +738 System.Web.Configuration.CompilationSection.Loadallassembliesfromappdomainbindirectory() +217 System.Web.Configuration.CompilationSection.Loadassembly(Assemblyinfo ai) +130 System.Web.Compilation.BuildManager.Getreferencedassemblies(Compilationsection compConfig) +170 System.Web.Compilation.BuildManager.Getprestartinitmethodsfromreferencedassemblies() +92

System.Web.Compilation.BuildManager.Callprestartinitmethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +290

System.Web.Compilation.BuildManager.Executepreappstart() +157

System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +549

[Httpexception (0x80004005): Could not load file or Assembly 'Html5datalist-DESKTOP-P3666CV' or one of its dependencies. The definition of the localized Assembly manifest does not correspond to the Assembly reference. (HRESULT exception: 0x80131040)]

System.Web.Httpruntime.Firstrequestinit(Httpcontext context) +10084960

System.Web.Httpruntime.Ensurefirstrequestinit(Httpcontext context) +95

System.Web.Httpruntime.Processrequestnotificationprivate(Iis7workerrequest Wr, Httpcontext) +254

  • Where does it happen? How does it happen?

  • As soon as I run the green button to run the site.

  • This article is top, will help you for sure. https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications?view=vs-2019

1 answer

4

I know the question is old, but just for reference, I will leave here the link to the answer in English with possible solutions in Portuguese.

This has to do with a reference in 64 pointing to 32 bits or vice versa.

1-So if your project is 64-bit the possible solution is to go to Tools -> Options -> Projects and Solutions -> Web Projects and check the box "Use the 64 bit version of IIS Express".

2-In IIS Manager go to Application Pools -> Defaultapppool -> Advanced Settings -> Mark "Enable 32-bit Applications" as true

Original question: https://stackoverflow.com/questions/3745612/infamous-assembly-binding-error

Browser other questions tagged

You are not signed in. Login or sign up in order to post.