I have a problem in a DLL file that I need to debug. I do not have the original source code for the DLL file. I used reflector to decompile the DLL and create it as a project. I added it to my solution and then removed the original DLL reference in my main
project and replaced it with a reference to the DLL project. My hope was that I could run it locally on Visual Studio's and set break points in the decompiled DLL project. However, I get the error: Could not load file or assembly 'AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT:
0x80131040). I have seen other posts on how to handle this with a DLL file, but I am dealing with the DLL as a separate solution in my project and am not sure what to do. Not sure it matters, but this is running on my local IIS server via Visual Studio's and is on .NET
2.0. Here is the Load Trace: Exception Details: System.IO.FileLoadException: Could not load file or assembly 'AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52' or one of its dependencies. The located assembly's manifest definition does not match the
assembly reference. (Exception from HRESULT: 0x80131040) Source Error: Line 128: this._MenuItems.Clear();
Line 129: else
Line 130: this._MenuItems.Add((object) menuItem);
Line 131: }
Line 132: } Source File: C:\Users\eric.Last_Name\Desktop\ZuluControls\Menus\LeftMenuControl\LeftMenuControl.cs Line: 130 Assembly Load Trace: The following information can be helpful to determine why the assembly 'AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52' could not be loaded. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Program Files (x86)\IIS Express\iisexpress.exe --- A detailed error log follows. === Pre-bind state information === LOG: User = LISC-IT\Eric.Last_Name LOG: DisplayName = AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52 (Fully-specified) LOG: Appbase = file:///C:/Users/eric.Last_Name/Desktop/IISSERVER/
LOG: Initial PrivatePath = C:\Users\eric.Last_Name\Desktop\IISSERVER\bin Calling assembly : ZuluControls, Version=1.0.0.2, Culture=neutral, PublicKeyToken=734e8cdd39728b61.LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\eric.Last_Name\Desktop\IISSERVER\web.config LOG: Using host configuration file: C:\Users\eric.Last_Name\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52 LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/2bb6b3ce/3abdb25d/AlphaSubRoutines.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/2bb6b3ce/3abdb25d/AlphaSubRoutines/AlphaSubRoutines.DLL. LOG: Attempting download of new URL file:///C:/Users/eric.Last_Name/Desktop/IISSERVER/bin/AlphaSubRoutines.DLL. WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. The Decompiled DLL AlphaSubRoutines, is being called from within another DLL called ZuluControls. I do not have the source code for the ZuluControls DLL either. I am not very knowledgeable about these things, but it looks like the ZuluControls DLL has a
specific reference (version, Public Key, etc) to the AlphaSubRoutines DLL. Either the ZuluControls is referencing the wrong AlphaSubRoutines DLL or the AlphaSubRoutine DLL Project has the wrong identifying information. Here is the AssemblyInfo.cs from the decompiled DLL Project: // Assembly AlphaSubRoutines, Version 1.0.0.10 [assembly: System.Reflection.AssemblyCopyright("")] [assembly: System.Reflection.AssemblyTitle("Alpha Subroutines")] [assembly: System.Reflection.AssemblyDescription("Subroutines Created for Alpha Applications")] [assembly: System.Reflection.AssemblyConfiguration("")] [assembly: System.Reflection.AssemblyCompany("Alpha Industries, Inc.")] [assembly: System.Reflection.AssemblyProduct("")] //[assembly: System.Reflection.AssemblyKeyFile(@"....\AlphaSubRoutines.snk")] [assembly: System.Reflection.AssemblyTrademark("")] //[assembly: System.Reflection.AssemblyDelaySign(false)] [assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations | System.Diagnostics.DebuggableAttribute.DebuggingModes.EnableEditAndContinue | System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints
| System.Diagnostics.DebuggableAttribute.DebuggingModes.Default)] [assembly:System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)] //[assembly: System.Reflection.AssemblyKeyName("AlphaSubRoutines")] [assembly: System.Runtime.CompilerServices.CompilationRelaxations(8)] I had to comment out three lines to get it to build without error, could that be part of the problem ? Any help would be appreciated !! |