c# – Cannot locate dll even though I put the dll in folder

I add the file to the directory but it is still telling me that it cannot find the file. What am I suppose to do now to fix this error?

       Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    
    Parser Error Message: Could not load file or assembly 'CrystalDecisions.Web, Version=13.0.32.4286, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    
    Source Error:
    
    
    Line 18:     
    Line 19:       
    Line 20:         
    Line 21:         
    Line 22:         
    
    Source File: C:inetpubwwwrootPOSweb.config    Line: 20
    
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'CrystalDecisions.Web, Version=13.0.32.4286, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be loaded.
    
    
    === Pre-bind state information ===
    LOG: DisplayName = CrystalDecisions.Web, Version=13.0.32.4286, Culture=neutral, PublicKeyToken=692fbea5521e1304
     (Fully-specified)
    LOG: Appbase = file:///C:/inetpub/wwwroot/POS/
    LOG: Initial PrivatePath = C:inetpubwwwrootPOSbin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:inetpubwwwrootPOSweb.config
    LOG: Using host configuration file: C:UsersokdokDocumentsIISExpressconfigaspnet.config
    LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config.
    LOG: Post-policy reference: CrystalDecisions.Web, Version=13.0.32.4286, Culture=neutral, PublicKeyToken=692fbea5521e1304
    LOG: Attempting download of new URL file:///C:/Users/okdok/AppData/Local/Temp/Temporary ASP.NET Files/vs/28ae311b/78674aee/CrystalDecisions.Web.DLL.
    LOG: Attempting download of new URL file:///C:/Users/okdok/AppData/Local/Temp/Temporary ASP.NET Files/vs/28ae311b/78674aee/CrystalDecisions.Web/CrystalDecisions.Web.DLL.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/POS/bin/CrystalDecisions.Web.DLL.
    WRN: Comparing the assembly name resulted in the mismatch: Revision Number
    ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
 <assemblies>
    <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
  </assemblies>

Also do you know what I should do about this error:

Could not load file or assembly 'Microsoft.ReportingServices.Interfaces' or one of its dependencies. An attempt was made to load a program with an incorrect format.
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.BadImageFormatException: Could not load file or assembly 'Microsoft.ReportingServices.Interfaces' or one of its dependencies. An attempt was made to load a program with an incorrect format.

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.ReportingServices.Interfaces' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = Microsoft.ReportingServices.Interfaces
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.ReportingServices.Interfaces | 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:/inetpub/wwwroot/POS/
LOG: Initial PrivatePath = C:inetpubwwwrootPOSbin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:inetpubwwwrootPOSweb.config
LOG: Using host configuration file: C:UsersokdokDocumentsIISExpressconfigaspnet.config
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.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/okdok/AppData/Local/Temp/Temporary ASP.NET Files/vs/28ae311b/78674aee/Microsoft.ReportingServices.Interfaces.DLL.
LOG: Attempting download of new URL file:///C:/Users/okdok/AppData/Local/Temp/Temporary ASP.NET Files/vs/28ae311b/78674aee/Microsoft.ReportingServices.Interfaces/Microsoft.ReportingServices.Interfaces.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/POS/bin/Microsoft.ReportingServices.Interfaces.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

Stack Trace:


[BadImageFormatException: Could not load file or assembly 'Microsoft.ReportingServices.Interfaces' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   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) +232
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.ReportingServices.Interfaces' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +762
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +167
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +238
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +78
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +334
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +178
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +746

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.ReportingServices.Interfaces' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737

Leave a Comment