Debugging Assembly Loading Failures


So…you’re seeing a FileNotFoundException, FileLoadException, BadImageFormatException or you suspect an assembly loading failure? Try the steps below to start your debugging process.


First, get the Message property from the exception. If the exception’s InnerException property is set, get the Message property from that. If the message is generic, also get the hresult by calling System.Runtime.InteropServices.Marshal.GetHRForException(), passing in the Exception object. If that info is not readily available, you may need to attach a debugger and set it to catch managed exceptions. Then, get the hresult by retrieving the private _HResult field of the managed Exception object.


Retrieving the Fusion log


If the exception message isn t enough for you to determine what the problem is, try getting the Fusion log. It will describe the binding failure (if this is due to an assembly binding failure, instead of a loading failure after the file is found). The exception may already include the log. If not, to get it, run fuslogvw.exe. If you don’t have fuslogvw.exe already, install the Framework SDK.



  • For pre-v2.0: click on “Log Failures.” If this is an ASP.NET or .NET Windows service app, select the Custom option and using regedit, set [HKLM\Software\Microsoft\Fusion\LogPath] to point to an existing directory (like c:\mylogs, not c:\). If you need to log all binds, not just failing ones, set [HKLM\Software\Microsoft\Fusion\ForceLog] as a DWORD value to 1.
  • For v2: click on “Settings,” then choose “Log bind failures to disk” if you only care about the failures or “Log all binds to disk” if you want to see all binding requests.
  • To turn on failure logging during a test run instead of by hand, have your script set [HKLM\Software\Microsoft\Fusion\LogFailures] as a DWORD value to 1 using regedit.

Then, click “OK.” Now, re-run the process. Next, click “Refresh” in fuslogvw, and a line should appear for each binding failure (or for each bind, if ForceLog is set). Now, double-click on the line in the “Application” column for the interesting bind, and a web page should come up with the Fusion log.


If the file was found, it was loaded from the last path probed in the log (or from the GAC, if there is no probed path shown).


Note: Unless you are explicitly debugging the failure of a resource to load, you will likely want to ignore failures to find assemblies with the “.resources” extension with the culture set to something other than “neutral”. Those are expected failures when the ResourceManager is probing for satellite assemblies.


Troubleshooting Fusion logging


Keep in mind that there may not be any entries if there were no binds or if there were no binding failures (when logging failures only). (And don’t forget to restart your application’s process after changing logging settings.) If there are not as many entries as you expect, you may need to clear your download cache to make room for them. To do that, in Internet Explorer, choose “Tools“, “Internet Options“, “Delete Files”, “OK“, then re-run your app and finally click “Refresh“ again in fuslogvw.


There is only one Fusion log saved per display name/codebase. So, if the same exact reference is requested twice in the same process, it will only show up once in fuslogvw. To see the duplicate logs, you’ll need to stop execution (for example, with breakpoints in your debugger) and then get the log at that time.


For FileNotFoundException:
At the bottom of the log will be the paths that Fusion tried probing for this assembly. If this was a load by path (as in Assembly.LoadFrom()), there will be just one path, and your assembly will need to be there to be found. Otherwise, your assembly will need to be on one of the probing paths listed or in the GAC if it’s to be found.


You may also get this exception if an unmanaged dependency or internal module of the assembly failed to load. Try running depends.exe on the file to verify that unmanaged dependencies can be loaded. Note that if you re using ASP.NET, the PATH environment variable it’s using may differ from the one the command line uses. If all of them could be loaded, try ildasm.exe on the file, double-click on “MANIFEST” and look for “.file” entries. Each of those files will need to be in the same directory as the manifest-containing file. 


For BadImageFormatException:
Try running peverify.exe on the file. That will give a more specific description about why it s considered a bad image. Keep in mind that modules built against v2 can not be loaded by a pre-v2 CLR.


For SecurityException:
You need Execute permission for loading any assembly. Also, if a codebase was used to load this file, you would need both FileIOPermission.Read and FileIOPermission.PathDiscovery or else WebPermission to the location (depending on whether this is a local file or a URL). Try caspol.exe to check your managed security settings.


For FileLoadException:


For an “Access is denied” message (for hresult E_ACCESSDENIED, 0x80070005):
Run tlist -m on the file to see if another process has the file locked and without share-read access. If not, check the ACLs for the file and its dependencies (especially if you’re using impersonation).


For a “The located assembly’s manifest definition with name [yourAssembly] does not match the assembly reference” message (for hresult FUSION_E_REF_DEF_MISMATCH, 0x80131040):
The Fusion log will say which part of the assembly reference failed to match what was found. It will be the assembly name, culture, public key (or token) or version (if the found assembly was strongly-named).


For “Unverifiable image [yourAssembly] can not be run” or “Can not run executable [yourAssembly] because it contains relocations” messages (for hresult COR_E_FIXUPSINEXE, 0x80131019):
That image must be run as the process exe or else be compiled as a dll. This is because MC++ has made optimizations for you in your image, based on the assumption that it will be the process exe. If it’s not the process exe, it won t be loaded at the expected location, so the assumed offsets will be incorrect. When the CLR sees such a file loaded as a non-process exe, it will reject the load.

Comments (108)

  1. Not related in any way to this specific post, Suzanne, but Welcome to the house! Have fun, and will look forward to reading your posts! :)

  2. Robert says:

    We I load a newly complied DLL for an ASP.NET application on the server the below is my problem. Do you know how to fix it?

    For a “The located assembly’s manifest definition with name [yourAssembly] does not match the assembly reference" message (for hresult FUSION_E_REF_DEF_MISMATCH, 0x80131040):
    The Fusion log will say which part of the assembly reference failed to match what was found. It will be the assembly name, culture, public key (or token), or version (if the found assembly was strongly-named).

  3. Suzanne says:

    Robert: Yes, either change the reference so it matches the found assembly, or copy over the right assembly which matches the reference, so that it will be found instead. For example, if the Fusion log says that the version doesn’t match, check against the found assembly’s version. In that case, probably the problem is that you’ve recompiled that assembly with another version. So, then, you may want to update the referencing assembly so that it matches the new version, use config to redirect to the new version, or just not change assembly verson numbers between non-shipping builds (see http://blogs.msdn.com/suzcook/archive/2003/05/29/57148.aspx ).

  4. Great post Suzanne.

    Do you have any links to more information about fusion logs? I was hoping to find something that explained a bit about what was going on for each line in the log.

    For instance I have a log that ends:

    LOG: Entering download cache setup phase.
    ERR: Setup failed with hr = 0x80070005.
    ERR: Failed to complete setup of assembly (hr = 0x80070005). Probing terminated.

    So I was hoping to find a description of what is going on during the "download cache setup phase".

  5. Suzanne Cook says:

    From winerror.h:
    // Access is denied.
    #define ERROR_ACCESS_DENIED 5L

    See my original blog entry for debugging advice about this specific hresult. See http://blogs.gotdotnet.com/alanshi/PermaLink.aspx/d3b8c7d9-b0c6-47fd-8ddf-20db971ba80d for more info about how Fusion has implemented the download cache.

  6. Phil Pastor says:

    Suzanne,

    I have read a number of you rposts regarding using the fusion log to debug assembly loading issues, but I just can’t get past this, and am hoping you may be able to shed a little light.

    This issue is regarding using the Microsoft.ApplicationBlocks.ExceptionManagement from the GAC for an ASP.NET application. My CustomPublisher is also in the GAC. I have a windows service that uses the same exception publishing assemblies, and it works beautifully. For whatever reason though, the ASP.NET application always fails. The interesting thing is that it does log the exception to the Windows Event log which means that it IS loading the assembly!!? Following are excerpts from various files to show you what I mean…

    Web.Config:
    <configSections>
    <section name="exceptionManagement"
    type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectionHandler,
    Microsoft.ApplicationBlocks.ExceptionManagement,
    version=1.0.1.0, culture=neutral, publicKeyToken=13da6d3f9482dd92"/>
    </configSections>

    <exceptionManagement mode="on">
    <publisher
    mode="on"
    assembly="Brulant.Library.Exceptions,
    Version=1.0.1.1, Culture=neutral, PublicKeyToken=13da6d3f9482dd92"
    type="Brulant.Library.Exceptions.BrulantDatabasePublisher"
    exclude="" />
    <publisher
    mode="on"
    assembly="Brulant.Library.Exceptions,
    Version=1.0.1.1, Culture=neutral, PublicKeyToken=13da6d3f9482dd92"
    type="Brulant.Library.Exceptions.BrulantTextFilePublisher"/>
    </exceptionManagement>

    FUSION LOG:

    *** Assembly Binder Log Entry (11/7/2003 @ 2:28:16 PM) ***

    The operation failed.
    Bind result: hr = 0x80070002. The system cannot find the file specified.

    Assembly manager loaded from: C:WindowsMicrosoft.NETFrameworkv1.1.4322fusion.dll
    Running under executable C:WindowsMicrosoft.NETFrameworkv1.1.4322aspnet_wp.exe
    — A detailed error log follows.

    === Pre-bind state information ===
    LOG: DisplayName = Microsoft.ApplicationBlocks.ExceptionManagement, Culture=neutral, PublicKeyToken=13da6d3f9482dd92
    (Partial)
    LOG: Appbase = file:///c:/inetpub/wwwroot/CORE
    LOG: Initial PrivatePath = bin
    LOG: Dynamic Base = C:WindowsMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Filescoree5dbef76
    LOG: Cache Base = C:WindowsMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Filescoree5dbef76
    LOG: AppName = c6d4cac7
    Calling assembly : (Unknown).
    ===

    LOG: Processing DEVPATH.
    LOG: DEVPATH is not set. Falling through to regular bind.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Post-policy reference: Microsoft.ApplicationBlocks.ExceptionManagement, Culture=neutral, PublicKeyToken=13da6d3f9482dd92
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/core/e5dbef76/c6d4cac7/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/core/e5dbef76/c6d4cac7/Microsoft.ApplicationBlocks.ExceptionManagement/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
    LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CORE/bin/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
    LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CORE/bin/Microsoft.ApplicationBlocks.ExceptionManagement/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/core/e5dbef76/c6d4cac7/Microsoft.ApplicationBlocks.ExceptionManagement.EXE.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/core/e5dbef76/c6d4cac7/Microsoft.ApplicationBlocks.ExceptionManagement/Microsoft.ApplicationBlocks.ExceptionManagement.EXE.
    LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CORE/bin/Microsoft.ApplicationBlocks.ExceptionManagement.EXE.
    LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CORE/bin/Microsoft.ApplicationBlocks.ExceptionManagement/Microsoft.ApplicationBlocks.ExceptionManagement.EXE.
    LOG: All probing URLs attempted and failed.

    Any help is GREATLY appreciated.

    Thank you,

    Phil

  7. Suzanne says:

    The problem is that the Version isn’t fully specified (see the "Partial" in the Fusion log) :

    LOG: DisplayName = Microsoft.ApplicationBlocks.ExceptionManagement, Culture=neutral, PublicKeyToken=13da6d3f9482dd92
    (Partial)

    Fusion won’t check the GAC for the assembly unless the full display name is given (see http://blogs.gotdotnet.com/suzcook/PermaLink.aspx/07954694-ac03-4459-80df-859a31cd76bc ).
    So, the code with the incomplete reference will need to be updated.

    It looks like the reference in the web.config is fully-specified, so that wasn’t the cause
    of this failure. That’s why the bind for the web.config type seemed successful (it was).

  8. Korhan says:

    Suzanne,

    Thanks for the informative blog. I am trying to deploy a windows app. Things were fine until I added an installer to the project to perform some custom actions. Using the fuslogvw I have located the problem. AppBase has been changed to Windows/System32 instead of the application folder. Therefore, when CLR probes for the assembly, it cannot find it and bind it. What would be the solution for this? I want the assemblies to stay where they are and not install it to GAC.

    Thank you very much for your help.

    Korhan

  9. Phil Pastor says:

    Suzaane,

    Thanks for your reponse regarding my issue with the Microsoft.ApplicationBlocks.ExceptionManagement in the GAC. It turns out that the web.config WAS the issue. Previously I declared the assembly as:
    <section name="exceptionManagement"
    type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectionHandler,
    Microsoft.ApplicationBlocks.ExceptionManagement,
    version=1.0.1.0, culture=neutral, publicKeyToken=13da6d3f9482dd92"/>

    …well, I changed it to:
    <section name="exceptionManagement"
    type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectionHandler,
    Microsoft.ApplicationBlocks.ExceptionManagement, version=1.0.1.0, culture=neutral, publicKeyToken=13da6d3f9482dd92"/>

    …and it worked! Notice that I removed the CarriageReturn from the declaration between the end of the assembly name and the word "version." Any idea why this would cause an issue ONLY when the assembly is in the GAC?

    Thanks again,

    Phil

  10. Korhan says:

    Suzanne,

    I thought you might like to see the error log before answering my above question. Here it goes

    *** Assembly Binder Log Entry (11/12/2003 @ 3:45:13 PM) ***

    The operation failed.
    Bind result: hr = 0x80070002. The system cannot find the file specified.

    Assembly manager loaded from: C:WINDOWSMicrosoft.NETFrameworkv1.1.4322fusion.dll
    Running under executable C:WINDOWSSystem32MsiExec.exe
    — A detailed error log follows.

    === Pre-bind state information ===
    LOG: DisplayName = cWiz Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    (Fully-specified)
    LOG: Appbase = C:WINDOWSSystem32
    LOG: Initial PrivatePath = NULL
    LOG: Dynamic Base = NULL
    LOG: Cache Base = NULL
    LOG: AppName = NULL
    Calling assembly : (Unknown).
    ===

    LOG: Processing DEVPATH.
    LOG: DEVPATH is not set. Falling through to regular bind.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Post-policy reference: cWiz Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    LOG: Attempting download of new URL file:///C:/WINDOWS/System32/cWiz Client.DLL.
    LOG: Attempting download of new URL file:///C:/WINDOWS/System32/cWiz Client/cWiz Client.DLL.
    LOG: Attempting download of new URL file:///C:/WINDOWS/System32/cWiz Client.EXE.
    LOG: Attempting download of new URL file:///C:/WINDOWS/System32/cWiz Client/cWiz Client.EXE.
    LOG: All probing URLs attempted and failed.

  11. sanjeev says:

    sir
    i have problem whenever calling asp.net pages in the event viewer "aspnet_wp.exe could bot be started .
    HREHULT for the further 80004005

  12. sanjeev says:

    sir
    i have problem whenever calling asp.net pages in the event viewer "aspnet_wp.exe could bot be started .
    HREHULT for the further 80004005

    please reply me

  13. Suzanne says:

    Phil: Pre-v2.0, Fusion didn’t ignore newlines in display names. The full display name needs to be (acceptably) specified for binds to the GAC to succeed. So, that’s why it failed to load from the GAC. But, partial binds can work in the ApplicationBase, which you’ve noticed (though they’re not recommended).

  14. Suzanne says:

    Korhan and Sanjeev: Those types of questions are better suited for Microsoft’s official technical support channels. They’re about MsiExec.exe / ASP.NET specifically, not about the loader. Try http://support.microsoft.com/ .

  15. Sridhar says:

    Hi
    I need help please………
    I have developed asp.net web application on 2002 ,Now i have only 2003 in my system and if i am trying to run the web application it is giving error:

    Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
    for Microsoft (R) .NET Framework version 1.1.4322.573
    Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

    vbc : error BC32400: Class ‘CLSID_CorSymWriter_SxS’ could not be created: Class not registered
    vbc : error BC31019: Unable to write to output file ‘C:WINDOWSMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Fileswebapplication34c7907884b8c4c7r6vd1nnj.pdb’: Class not registered

    Thanks in adnace

  16. Suzanne says:

    Check your registry for that CLSID – sounds like it’s not registered. I suspect that you may need to reinstall your v1.1 CLR.

  17. Soren says:

    Suzanne, thank you for the very infromative blog.

    Could you please explain how does the loader work in the following scenario:

    – a .net assembly (COM/ActiveX dll, registered for interop) (component 1, located in Folder A on disk)

    – is called via COM from an unmanaged COM component (component 2, located in the same folder A on disk)

    – This COM component is invoked from an external Windows application (again unmanaged) (component 3, located in Folder B on disk)

    Fusion cannot find the .net assembly. The fusion log shows that it is trying to load it from Folder B, the path of component 3, rather than from Folder A.

    However, if we eliminate component 3 from the scenario and call the assembly directly from the user interface of component 2, it all works fine.

    In COM there used to be the InProcServer32 key that gave the path to the executable, but there is no such equivalent in .net.

    Is there a path variable or something that can be set to make the loader locate assemblies like this one?

  18. Suzanne says:

    Yes, for the failing case, the ApplicationBase is the exe’s dir, Folder B. So, it is by design that it is trying to load it from there when loading by display name.

    In the success case, I imagine that either the ApplicationBase is Folder A, or the LoadFrom context is being used. (See http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx for info about the LoadFrom context.)

    Actually, for .NET, the InProcServer32 key may contain both an Assembly and a CodeBase value. However, please see the link above before relying on the CodeBase – usually the Load context is more appropriate.

  19. Lyle Dodge says:

    Using a reflection based plugin app.

    Project A, B, and C are all in the same solution.

    Project A is a web app. The web app loads up the assemblies in the bin directory looking for certain types. Project B is a plugin that project A directly references. Project C is a plugin that references project B, but is not referenced by Project A. When the solution is rebuilt (all references are now happy), everything works fine when Project C’s assembly is dropped into the bin of the webapp.

    When Project A and B are rebuilt, but not project C, the Project C’s assembly in the bin folder of the webapp now references assemblies which are no longer there when Project C is loaded up in the reflection phase. What is the proper way to do this if Project C is updated more frequently than Project A or B?

    The error we are getting is saying that methods in Project C "does not have an implementation".

  20. Suzanne says:

    It sounds like the error comes from C having an outdated reference to B, because B is strongly-named, and has been rebuilt with a new version. Getting the Fusion log will verify it. See http://blogs.msdn.com/suzcook/archive/2003/05/29/57148.aspx for a discussion about avoiding that problem.

  21. Ols Moessian says:

    When loading a managed control in IE, the fusion log shows FileNotFound errors for all the assemblies involved, although everything seems to work just fine. Is this normal?

    The log errors indicate that the assemblies were searched in localhost and localhost/bin, even though the application is installed in localhost/xx. Perhaps I need to configure something to avoid these messages?

    Thank you for your time.

  22. Lyle Dodge says:

    We kind-of found the problem. Project C’s plugin class was abstract, and inheriting from an abstract class. the parent abstract class’ method was abstract. when reflecting the abstract parent’s abstract method it was erroring out. changing the abstract parent’s method to virtual fixed this. basically:

    assembly a – class a : abstract

    assembly a – class a – method foo : abstract

    assembly b – class b : abstract : a.a

    assembly c – class c : concrete

    assembly c – class c : method foo

    reflecting foo in c was erroring out, saying the method a:foo was not implemented. changing a:foo to virtual fixed the problem.

    Any thoughts?

  23. Vasasnth T T says:

    File or assembly name Microsoft.ApplicationBlocks.ExceptionManagement, or one of its dependencies, was not found.

  24. Mark says:

    A different sort of assembly reference problem…

    My application’s assembly manifest is referencing an old version of a dependent .NET DLL. I can’t figure out why.

    The runtime *finds* the correct version, but *thinks* it’s the wrong one.

    The application’s Reference is to the correct version. No DLLs of the old version exist on the file system or in the GAC. I’ve rebuilt the app, rebooted, restarted IIS, yelled at my monitor, and pulled out most of my hair.

    So when an app is built, where does it get the reference version info that goes in the assembly manifest?

    Thanks.

  25. Rajiv says:

    Suzanne , Thanks I had a major problem,I googled and got many tips , Justw ante dto thank you

  26. Simon Geering says:

    Something else that I found also helps, if you are using project references and you get an Assembly Load Failure exception along the lines of:

    "The located assembly’s manifest definition with name ‘xxxx’ does not match the assembly reference."

    Then check that all projects are selected to be compiled in the active build configuration. So that you re-compile all projects in the solution on the next build.

    This is achieved by opening the "Build Configuration" option dialogue on the Build menu and checking all checkbox items.

    Hope this helps.

    Regards

    Simon Geering

  27. Nedofeang says:

    Compiler Error Message: BC31019: Unable to write to output file ‘C:WINNTMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Filesroot708093bd6afa7483acb1iqp0.dll’: System Error &H80070005&

    please i am sick of this,help me out man.

  28. bardianto.Net-er says:

    Close your browser,find your file(acb1iqp0.dll),delete it and

    reopen browser.

    It maybe because of

    -different file version between browser cache and server file.

    -setting .NET framework security configuration.

    Hope this help.

  29. Anton Sochenov says:

    I ran into a strange problem. My web app requires certain assemblies and of course when it starts, these assemblies are loaded in the application domain. And I can access them using AppDomain.GetAssemblies but this works only the first time after application load. Next time when web app is reloaded – because project has recompiled the GetAssembly does not show my assembly on the list of loaded assemblies. What’s a strange – fusion log show that the assembly successfully loaded but GetAssembly does not show it on the list.

  30. Michael says:

    You may want to point out that a common cause of "Access is denied" issues when loading an assembly under ASP.NET is documented in http://support.microsoft.com/default.aspx?scid=kb;en-us;329065. The Windows Index service can lock the Temporary ASP.NET Files directory and the symptom is often an assembly load failure.

    <BR>

    See: PRB: Access Denied Error When You Make Code Modifications with Index Services Running

    Article ID : 329065

  31. Adam says:

    I am encountering the Bind result: hr = 0x80070005. Access is denied.

    issue. But none of the solutions are working for me.

    It works fine on 2000 and XP. But we are testing on 2003 and get the error.

    We are Dynamically creating Assemblies and loading them in a seperate app space.

    We are using LoadFrom to specify a directory outside the working directory of the current app.

    Something intresting that I can’t find any info on is this message we seen in the fusion logs on OS’s where it works…

    WRN: A duplicate assembly was found while copying the assembly item to the cache.

    ?

  32. Adam says:

    Turns out it’s just permissions… if i run the Application Pool as an ADmin it goes away.

    now to find where the permissions are wrong.

    Still intrested in that WRN message?

  33. Vagif Abilov says:

    I noticed the following behaviour of ASP.NET sites: when I start a Web side, Fusion reports bindings for assemblies in the BIN directory twice: first with partial name and then with full name. What happens then is that if later I try to load another assembly using LoadFrom, then if this assembly references those already loaded in ASP.NET cache, they fail to load if they have a different strong version. Basically this means that ASP.NET don’t really treat private stong named assemblies as strong named: attempt to load extra plugins from other directories may fail if assembly with different version (but same) name is already in the cache.

  34. john says:

    Dude, thanks a ton, I was really in a bind. Thankfully all it took was depends.exe to expose the issue.

  35. We are seeing this when using No Touch Deployment. Our windows .net clients gets dlls from our web server as needed.

    Some of the dlls are loaded ok, some of the loads generate a FileNotFoundException. If I look in the IIS Log file, I see a 200 Return code for the dllfile in question so the web server returned the dll. Something on the client side is not ‘finding’ it or is blocking the return.

    We log the details of the exception and I can see what the loader is trying to do:

    LOG: Publisher policy file is not found.

    LOG: Host configuration file not found.

    LOG: Using machine configuration file from

    C:WINDOWSMicrosoft.NETFrameworkv1.1.4322configmachine.config.

    LOG: Post-policy reference: Janus.Windows.ButtonBar.v2,

    Version=2.0.1163.0, Culture=neutral, PublicKeyToken=21d5517571b185bf

    LOG: Attempting download of new URL file:///C:/Program Files/Custom

    Data Systems/AM.NET/Janus.Windows.ButtonBar.v2.DLL.

    LOG: Attempting download of new URL file:///C:/Program Files/Custom

    Data Systems/AM.NET/Janus.Windows.ButtonBar.v2/Janus.Windows.ButtonBar.v2.DLL.

    LOG: Attempting download of new URL file:///C:/Program Files/Custom

    Data Systems/AM.NET/Janus.Windows.ButtonBar.v2.EXE.

    LOG: Attempting download of new URL file:///C:/Program Files/Custom

    Data Systems/AM.NET/Janus.Windows.ButtonBar.v2/Janus.Windows.ButtonBar.v2.EXE.

    LOG: Attempting download of new URL

    http://172.16.5.1/AMNETAssemblies/Janus.Windows.ButtonBar.v2.DLL.

    LOG: Attempting download of new URL

    http://172.16.5.1/AMNETAssemblies/Janus.Windows.ButtonBar.v2/Janus.Windows.ButtonBar.v2.DLL.

    LOG: Attempting download of new URL

    http://172.16.5.1/AMNETAssemblies/Janus.Windows.ButtonBar.v2.EXE.

    LOG: Attempting download of new URL

    http://172.16.5.1/AMNETAssemblies/Janus.Windows.ButtonBar.v2/Janus.Windows.ButtonBar.v2.EXE.

  36. Puneet Gupta says:

    Hi,

    I have a windows application using Interop and reflection installed on Win XP & Win2K machine(s). On some machine I get the above message which sometime allows my application to work after the display and sometime it crashes my application. It comes in different contexts and in different scenarios but not reproducable.

    Can you help me? What I am doing worng n where?

  37. Phill Djonov says:

    Hi. Maybe I’m trying to do the impossible or maybe this is just a BETA issue but I just want an answer either way.

    I’ve got a dll full of horrible, horrible (!) assembly routines. Most of it is SSE stuff and all of it is really useful. I’m trying to add a binding to .NET to my dll and here’s what I’ve done so far.

    1. Moved my project to VS.NET 2005 (BETA 2).

    2. Added a managed.cpp file to the project which is supposed to serve as the bridge between the managed world and a pile of __asm blocks.

    3. On the managed.cpp file ONLY, I have added /clr.

    4. Set the linker to FORCE IJW.

    5. Added the dll as a reference to a test app written in C#.

    6. Hit compile. No errors. No warnings. No trouble with the linker.

    7. Called some functions in managed.cpp from my C# app’s Main. Note: intellisense had picked up the functions in managed.cpp.

    8. Tried to run the program.

    I get this every time:

    System.IO.FileLoadException was unhandled

    Message="Could not load file or assembly ‘tnCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. One or more arguments are invalid (Exception from HRESULT: 0x80000003)"

    Source="Stormfall"

    FileName="tnCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"

    FusionLog=""

    StackTrace:

    at Stormfall.Program.Main()

    at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)

    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

    at System.Threading.ThreadHelper.ThreadStart()

    It’s the same outside of the debugger, only without the Microsoft.VisualStudio.HostingProcess bits.

    The semi-managed dll loads into ILDASM or Reflector (latest version) without any errors. I can browse around its functions and look at their IL without any errors from either program.

    The fusion log doesn’t even mention my dll. It stops logging after the exe loads.

    What gives? How is it that VS.NET (references window, intellisence), ILDASM, and Reflector, all recognize the dll as a valid CLR image while it keeps failing to load?

    Is the loader detecting SSE instructions and killing the whole thing (because that just makes no sense at all)? Is this a BETA thing? Am I just doing something that’s impossible by design (i.e. give up now and write a seperate wrapper dll or lots of little P/Invoke stubs)?

    Any help would be more than appreciated.

  38. Phill Djonov says:

    Sorry for posting here. Thought this was a loader bug/limitation. It isn’t. The bug belongs to the VC++ compiler team.

    For anyone that googled their way onto this or are interested, the VC++ (BETA 2, anyway) compiler/linker will generate a bad image if any file in the project is not compiled with /clr (much help that is with asm routines). #pragma unmanaged can then be used to, etc, etc, etc…

    Sorry again.

  39. Haris says:

    In my case Fusion is not showing any log.In registry I created a new key LogPath in HKLM/Softwarre/Microsoft/Fusion and set its default value to H:tempfusion

    but when I press refresh nothing happens and when i press View Log it says Error: Unable to open cache file!

  40. Robert S. says:

    Thanks for the info! Not sure if in my case I have a special issue or if I’m just not fully understanding troubleshooting assemblies. I created a WinForm app simply named, compiled, installed, running in production. Recently decided to strong-name the entire VS solution, compiles fine, but does run due to "The located assembly’s manifest definition…does not match the assembly reference." When I check the Fusion log it’s indicating that a prior version of the .exe is being executed. All updated dependent assemblies show correctly – new ver., pub key, paths, names, etc. It seems something somewhere is trying to run the old .exe (in the new .exe path no less) despite the new application manifest being seemingly correct. What implications are there from going from a simply named to strong named code base?

  41. Sacha says:

    Hi Suzanne

    Thanks for your informative blog.

    I am trying to write a windows service that copies assemblies from a central server and executes them dynamically. It seems to work fine using a separate app domain to load the assembly to be executed. I then reload the domain when I have a new version or whatever.

    My problem is that when I try and add a new assembly (for copying locally) that is referenced by the assembly (again that is copied locally) I am executing, I get the following fusion error:

    LOG: Entering run-from-source setup phase.

    WRN: Comparing the assembly name resulted in the mismatch: NAME

    ERR: The assembly reference did not match the assembly definition found.

    ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

    The referenced assembly I am using is one created by adding a reference to a com object that I know exists on all machines involved.

    Prior to dynamic execution the referenced assembly should not exist on any of the client machines hence I don’t know what the "assembly definition" that is not matching refers to.

    Any ideas?

    Many Thanks

    Sacha

  42. Boni says:

    Dear Madam,

    thanks for the only explantion of this error, which I found in internet.

    #his is because MC++ has made optimizations

    Do you know is it possible to switch this optimizations off? Which compiler setting is it?

    Thanks,

    Boni

  43. Suzanne, Thanks a lot for the post; it solved a problem that I’ve been having for hours on end.

    But in my case, it turned out there was a missing assembly, but the exception message said a type could not be loaded from an assembly that existed. Maybe loading this assembly triggered an attempted load of the non-existent one, but in that case, why doesn’t the exception message say so? Why should I have to run fuslogvw?

  44. cool says:

    Great blog entry.

    Using the log solved a problem I was stuck on

    since yesterday.

  45. daisy says:

    Hello Maam,

    I have this strange problem while re-running any of C# assemlies more than once.

    mid-way while running my application which references a assembly, i get this error :

    Access is denied

    After around 5 mins when i refresh the page it gets loaded.

    i doubt some problem of history or garbage collection.

    Can u please help me on this?

  46. Les says:

    Thanks for your blog. It helped me fix my managed file load problem.

  47. Ken says:

    I am having a problem loading the following MS Enterprise Library assembly.  I have tried many of the fixes on this blog (I think) below is the information from the fusion log:

    Assembly manager loaded from:  C:WINDOWSMicrosoft.NETFrameworkv2.0.50727mscorwks.dll

    Running under executable  C:Documents and SettingskwenyonMy DocumentsVisual Studio 2005ProjectsRetailBeerSystemsRetailBeerSystemsbinDebugRetailBeerSystems.vshost.exe

    — A detailed error log follows.

    === Pre-bind state information ===

    LOG: User = STRATISINCkwenyon

    LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral, PublicKeyToken=db1db703afa726aa

    (Fully-specified)

    LOG: Appbase = file:///C:/Documents and Settings/kwenyon/My Documents/Visual Studio 2005/Projects/RetailBeerSystems/RetailBeerSystems/bin/Debug/

    LOG: Initial PrivatePath = NULL

    Calling assembly : Microsoft.Practices.EnterpriseLibrary.Configuration, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null.

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: C:Documents and SettingskwenyonMy DocumentsVisual Studio 2005ProjectsRetailBeerSystemsRetailBeerSystemsbinDebugRetailBeerSystems.vshost.exe.config

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.config.

    LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral, PublicKeyToken=db1db703afa726aa

    LOG: Attempting download of new URL file:///C:/Documents and Settings/kwenyon/My Documents/Visual Studio 2005/Projects/RetailBeerSystems/RetailBeerSystems/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Data.DLL.

    WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN

    ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

    Can you please help me with this??

  48. Ken says:

    I found the problem, it was a namespace or scope issue in my config file.

  49. Balaji says:

    Hello Suzanne – I have a factory that will get all files in the bin folder, load the assembly using Assembly.LoadFrom method and check if it supports a particular interface before creating an instance of the same. My problem is everything works fine when the ASPNET user is a member of the Administrators. Once i remove it from administrators then it fails with Access denied message. Any pointers, ideas is appreciated. Thanks

  50. Hi Suzane,

    I am trying to Xcopy the ASP.NET application from my local machine (Windows XP) to a development server (Win 2003). I am using the Enterprise library for dalaBase access, Logging, Exception handling etc. The application runs fine in my local machine (I have complete suite of .Net and other tool in my local machine)

    But When I Xcopy the files and set up the IIs WebServer, my enterrprise library would not load. We have Integrated Windows authentication for our application. Could you please help me solve this problem??

    Thanks :)

    I am getting the following error:

    Server Error in ‘/ConferenceRoomScheduler’ Application.

    ——————————————————————————–

    Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common’ or one of its dependencies. Access is denied.

    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.Practices.EnterpriseLibrary.Common’ or one of its dependencies. Access is denied.

    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.Practices.EnterpriseLibrary.Common’ could not be loaded.

    === Pre-bind state information ===

    LOG: User = Unknown

    LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Common

    (Partial)

    LOG: Appbase = file:///C:/SourceCenter/ITSApplications/DotNETApplications/CodeCenter/UserExperience/Applications/ConferenceRoomScheduler/WebApplication/

    LOG: Initial PrivatePath = C:SourceCenterITSApplicationsDotNETApplicationsCodeCenterUserExperienceApplicationsConferenceRoomSchedulerWebApplicationbin

    Calling assembly : (Unknown).

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: C:SourceCenterITSApplicationsDotNETApplicationsCodeCenterUserExperienceApplicationsConferenceRoomSchedulerWebApplicationweb.config

    LOG: Using host configuration file: \?c:windowsmicrosoft.netframeworkv2.0.50727aspnet.config

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.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:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/conferenceroomscheduler/acb5f87b/720897aa/Microsoft.Practices.EnterpriseLibrary.Common.DLL.

    LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/conferenceroomscheduler/acb5f87b/720897aa/Microsoft.Practices.EnterpriseLibrary.Common/Microsoft.Practices.EnterpriseLibrary.Common.DLL.

    LOG: Attempting download of new URL file:///C:/SourceCenter/ITSApplications/DotNETApplications/CodeCenter/UserExperience/Applications/ConferenceRoomScheduler/WebApplication/bin/Microsoft.Practices.EnterpriseLibrary.Common.DLL.

    LOG: Using application configuration file: C:SourceCenterITSApplicationsDotNETApplicationsCodeCenterUserExperienceApplicationsConferenceRoomSchedulerWebApplicationweb.config

    LOG: Using host configuration file: \?c:windowsmicrosoft.netframeworkv2.0.50727aspnet.config

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.config.

    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).

    ERR: Failed to complete setup of assembly (hr = 0x80070005). Probing terminated.

    Stack Trace:

    [FileLoadException: Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common’ or one of its dependencies. Access is denied.]

    [FileLoadException: Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. Access is denied.]

      System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0

      System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211

      System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141

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

      System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32

    [ConfigurationErrorsException: Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. Access is denied.]

      System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596

      System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +3479049

      System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46

      System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177

      System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +180

      System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +347

      System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125

      System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +378

    [HttpException (0x80004005): Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. Access is denied.]

      System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57

      System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612

      System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

    [HttpException (0x80004005): Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. Access is denied.]

      System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3426855

      System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88

      System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +149

  51. Eddie Chin says:

    Hi Suzanne,

    I am trying to do setup and deployment using Visual Studio 2005. I have the plug-in

    Add Web Deployment Project…

    that generates a .dll file for

    my web application and puts it

    in a bin subdirectory. Next, I

    build the setup and deployment project and try to install the

    app on my machine as test case.

    My web app gets installed at

    c:/Inetpub/wwwroot/[name of app]

    and the .dll file for my web app

    is installed at

    c:/Inetpub/wwwroot/[name of app]/bin

    However when I try to browse my web

    app I get the following error:

    "Could not load the assembly…

    Make sure that it is compiled before

    accessing the page."

    and it shows the first line of the

    .aspx file I am browsing:

    inherits="Login, Membership"

    Login being the class name of the code-behind file associated with the .aspx file. Membership being the name of the .dll file.

    What am I doing wrong?

  52. The following links to .NET resources have been collated over time with the assistance of colleagues.&amp;nbsp;…

  53. I ran across a blog post from Suzanne Cook this past&amp;nbsp;weekend that has been around for a while, but…

  54. Stefan Larimore says:

    We have an issue using the hosting APIs from unmanaged C++ app.  When calling pAppDomain->ExecuteAssembly_3 (…) the application runs if it is a C# application.  If it is created with MC++, we get the COR_E_FIXUPSINEXE, which you cited above.  So far so good.

    Our problem now is we are hosting C# app which references a MC++ assembly.  When the type from the MC++ assembly is used, we see COR_E_BADIMAGEFORMAT thrown.  Is there any workaround for this problem?

    We are using ICorRuntimeHost interface on the CLR v2.0.  

  55. Brad says:

    I am running into one of those Bind erros:  result: hr = 0x80070002. The system cannot find the file specified.

    I cannot figure it out… grrr…

    It works when deployed on one server, but fails on another.

    It is a windows forms dll being downloaded from a windows client app using Assembly.Load with a version number and a strong name.  Prior to using the strong name I was using LoadFrom and got the same error.

    The dll references a web service and some standard .net things like system…

  56. Kanna says:

    I am facing the same problem but I didn’t find any useful help to resolve this problem. Could you please send me the pointers to resolve this issue.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=81140&SiteID=1

    Thanks,

    Kanna

  57. Rpaul says:

    I’m trying to create my own Interop.Scripting Dll. I tlpimp no problem, runs locally fine

    if I move the dll to the server and regasm I get this error

    Any help would be appreciated

    Type library exporter warning: Referenced type is defined in managed component,

    which is imported from a type library that could not be loaded because it was no

    t registered (type: ‘ADODB.Recordset’; component: ‘C:WINNTassemblyGACADODB7

    .0.3300.0__b03f5f7f11d50a3aADODB.dll’).

    RegAsm : error RA0000 : Type library exporter encountered an error while process

    ing ‘rsEventLog.clsEventLog+_clsEventLog.getRSEventsEx(#0), rsEventLog’. Error:

    Type library exporter cannot load type ‘Scripting.Dictionary’ (error: System.IO.

    FileLoadException: Could not load file or assembly ‘Interop.Scripting, Version=1

    .0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The lo

    cated assembly’s manifest definition does not match the assembly reference. (Exc

    eption from HRESULT: 0x80131040)

    File name: ‘Interop.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=

    null’

  58. MikeFinney says:

    Hi Suzanne,

    Great info, but not quite what I need after reading everything. I am trying to install .NET 2.0 and I keep getting these messages in the windows installer logs for a number of assembly files.

    07/07/06 00:16:50 DDSet_Status: LANGID: 1033

    07/07/06 00:16:50 DDSet_Entry: ConfigureNativeImage started

    07/07/06 00:16:50 DDSet_Status: Deferred or Commit action for NGEN

    07/07/06 00:16:50 DDSet_Status: CustomActionData: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727ngen.exe install "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /NoDependencies /nologo;4308992

    07/07/06 00:16:50 DDSet_Status: Running Command Line: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727ngen.exe install "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /NoDependencies /nologo

    07/07/06 00:16:50 DDSet_Status: LANGID: 1033

    Installing assembly mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    You must have administrative credentials to perform this task. Contact your system administrator for assistance.

    07/07/06 00:16:50 DDSet_Status: Process returned -1

    07/07/06 00:16:50 DDSet_Status: Incrementing progress bar based on filesize of: 4308992

    07/07/06 00:16:50 DDSet_CARetVal: 0

    07/07/06 00:16:50 DDSet_Entry: ConfigureNativeImage ended successfully

    However, I can run gpresult /z and it clearly shows I am a member of the Domain Admins group.

    Looking in the windowsassembly folder, mscorlib is there and it is the 2.0 version.

    This is not the only assembly that gets the access denied message, there are others and they are interspersed with successful ones.

    I have tried with domain admin accounts as well as local admin accounts. Any ideas would be gratefully appreciated.

    Thanks,

    Mike Finney

  59. kendo_dragon says:

    When I look at the fuslogvw window I see there are two entries for each assembly.  From what I can tell the first entry is the result of a "partial bind" and all of the useful information is in there.  The second entry shows the result of the subsequent "full bind" request and is useful for showing which assembly is requesting the bind.

    My question is why is it loading on partial and then loading on fully-specified right afterwards?  Should it matter to us in our asp.net application?  Would we be better off changing to force the fully-specified be used only (i.e., through a vs reference rather than LoadFrom(..) )?

    Jeff

  60. This is basically a reminder post, but you might find it useful.

    In the development I have been doing…

  61. Thanks to Suzanne Cook for this one. &amp;quot;First, obviously, find the two types for which the cast failed,

  62. Natasha says:

    Dear Suzanne, I am with .NET C# 2003. I have Web app and 2 Class Library compiled as dll in one solution(datalayer and business layer) . It was all OK, maybe I rebuild my DLLs and something was done wrong.

    I created [HKLMSoftwareMicrosoftFusionLogPath] pointed to Cmylogs.txt and I have
    [HKLMSoftwareMicrosoftFusionLogFailures] set to 1 as you recommended

    Assembly binding log give me an error when I clickc “View Log” button “Error:Unable to open cache file!” So I failed to see the log and I am having hard time to fix the problem:

    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: Access is denied: ‘PCTracker.DataObjects’.

    Source Error:

    Line 196: <add assembly=”System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”/>
    Line 197: <add assembly=”System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”/>
    Line 198: <add assembly=”*”/>
    Line 199: </assemblies>
    Line 200: </compilation>

    Source File: c:winntmicrosoft.netframeworkv1.1.4322Configmachine.config    Line: 198

    Assembly Load Trace: The following information can be helpful to determine why the assembly ‘PCTracker.DataObjects’ could not be loaded.

    === Pre-bind state information ===
    LOG: DisplayName = PCTracker.DataObjects
    (Partial)
    LOG: Appbase = file:///c:/inetpub/wwwroot/PCTracker
    LOG: Initial PrivatePath = bin
    Calling assembly : (Unknown).
    ===

    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Post-policy reference: PCTracker.DataObjects
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/pctracker/ae1e1489/30fd1387/PCTracker.DataObjects.DLL.
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/pctracker/ae1e1489/30fd1387/PCTracker.DataObjects/PCTracker.DataObjects.DLL.
    LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/PCTracker/bin/PCTracker.DataObjects.DLL.

  63. TraderPub says:

    I am getting this error in the event view when i run my application. could you please help me see figure this out.

    Event Type: Warning

    Event Source: AdBankError

    Event Category: None

    Event ID: 0

    Date: 11/8/2006

    Time: 4:40:30 PM

    User: N/A

    Computer: TPTTDLAP015598

    Description:

    System.IO.FileLoadException: Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    File name: ‘Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’

      at Trader.AdBank.Data.SqlClient.SqlMessageQueueProviderBase.GetByBrokerName(TransactionManager transactionManager, String broker, String name, Int32 start, Int32 pageLength, Int32& count)

      at Trader.AdBank.Data.Bases.MessageQueueProviderBaseCore.GetByBrokerName(String broker, String name) in C:TraderAdBankVersion3.0Trader.AdBank.DataBasesMessageQueueProviderBaseCore.generated.cs:line 858

      at Trader.AdBank.Messaging.MsmqClient.get_Entity() in C:TraderAdBankVersion3.0Trader.AdBank.MessagingMsmqClient.cs:line 608

      at Trader.AdBank.Messaging.MsmqClient.Recieve() in C:TraderAdBankVersion3.0Trader.AdBank.MessagingMsmqClient.cs:line 347

    === Pre-bind state information ===

    LOG: User = NT AUTHORITYSYSTEM

    LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null

    (Fully-specified)

    LOG: Appbase = file:///C:/Trader/AdBank/Version/3.0/Trader.AdBank.Services.MessageImporter/bin/Debug/

    LOG: Initial PrivatePath = NULL

    Calling assembly : Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null.

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: C:TraderAdBankVersion3.0Trader.AdBank.Services.MessageImporterbinDebugTrader.AdBank.Services.MessageImporter.exe.config

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.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:/Trader/AdBank/Version/3.0/Trader.AdBank.Services.MessageImporter/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Common.DLL.

    WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN

    ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

    thanks

  64. Sandra says:

    Hi,

    Could you help me on something a bit different?

    I have an unmanaged control (MFC) I want to use in IE. This is using several Dlls managed and unmanaged.

    The only way I set it to work is when I copied the managed assemblies to the IE dir. But they still need to be at the OCX dir for registration to work. Why?

    I also tried to load the managed assembly with LoadFrom, but it doesn’t seam to change the IE context.

    I tried to sign the assemblies but now the ocx is not registering, when I specify the publicKey in the dependency.

    Thanks a lot…

    Sandra

  65. Jim says:

    Could this same information be included in exception messages when loads fail? It is rare for a fusion log to be enabled on a machine, and having to enable it and then try to recreate an error is 1) tedious internally, 2) untenable externally (ever try to get an end-user to enable a fusion log). This information is exactly what a developer expects to see in an exception message.

  66. jshowalter says:

    We spent two days tracking down the cause of HRESULT: 0x8013141A. The fusion log didn’t help. The problem was ultimately tracked to calling LoadFrom with an assembly’s full pathname that was not in the build path or GAC, where the assembly being loaded and the assembly doing the loading were both delay signed, and skip verification had not been run. Googling for the answer to the problem was futile, because there were too many false positives. It would be very helpful to have a table available online that lists each of the loader error codes, and every known possible cause of each error. This blog might be a good place to start such a table.

  67. jshowalter says:

    We have delay-signed assemblies on a test machine. Skip verification has been run. We can load an assembly from the build output directory using Assembly.LoadFrom, but the fusion log consistently displays a load failure for XmlSerializers, an assembly that exists nowhere on our machine. We think it is something that .NET generates. We have disabled all “Generate serialization assembly” dropdowns in all of our projects, and that seems to have no effect. There are numerous posts online about this bind failure and XmlSerializers, but no answers to the problem. Can you explain what is happening, whether that can cause loads to fail (it does in our case if we disable skip verification), and how to make it stop? Here is the fusion log:

    *** Assembly Binder Log Entry  (12/26/2006 @ 8:57:50 AM) ***

    The operation failed.

    Bind result: hr = 0x80070002. The system cannot find the file specified.

    Assembly manager loaded from:  C:WINDOWSMicrosoft.NETFrameworkv2.0.50727mscorwks.dll

    Running under executable  C:Program FilesTestDriven.NET 2.0ProcessInvocation.exe

    — A detailed error log follows.

    === Pre-bind state information ===

    LOG: User = XYZtestuser

    LOG: DisplayName = TestProject.XmlSerializers, Version=2.1.3.0, Culture=neutral, PublicKeyToken=7ce6deabcb36a8ea, processorArchitecture=MSIL

    (Fully-specified)

    LOG: Appbase = file:///C:/BuildOutput/assemblies/Debug

    LOG: Initial PrivatePath = NULL

    LOG: Dynamic Base = NULL

    LOG: Cache Base = C:Documents and SettingstestuserLocal SettingsTempTestDrivenShadowCopy633027202692884393

    LOG: AppName = domain-nunit.addin.dll

    Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: BuildOutputassembliesDebugTestProject.dll.config.temp

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.config.

    LOG: Post-policy reference: TestProject.XmlSerializers, Version=2.1.3.0, Culture=neutral, PublicKeyToken=7ce6deabcb36a8ea, processorArchitecture=MSIL

    LOG: GAC Lookup was unsuccessful.

    LOG: Attempting download of new URL file:///C:/BuildOutput/assemblies/Debug/TestProject.XmlSerializers.DLL.

    LOG: Attempting download of new URL file:///C:/BuildOutput/assemblies/Debug/TestProject.XmlSerializers/TestProject.XmlSerializers.DLL.

    LOG: Attempting download of new URL file:///C:/BuildOutput/assemblies/Debug/TestProject.XmlSerializers.EXE.

    LOG: Attempting download of new URL file:///C:/BuildOutput/assemblies/Debug/TestProject.XmlSerializers/TestProject.XmlSerializers.EXE.

    LOG: All probing URLs attempted and failed.

  68. GQ says:

    I have an issue that is related to the IE7 installation on XP. The system MPR and SHLWAPI DLLs have been updated during IE7 install and now attempt to load DWMAPI.DLL (a Vista only DLL).

    My problem is when I create an application that runs as a Windows Service using .NET and VS2005 C#.

    I have a utility .NET Class project (DLL) that specifically uses the System.Net assemblies and is called by my Windows Service assembly. I also have another non-Windows Service application that also uses the utility class.

    The non-service application uses the same code in the Window Service version and it runs fine. It loads the utility class DLL without crashing even though I’ve used the Depends tool to verify that there is a problem finding the missing DWMAPI.DLL.

    The Windows service version of my application however crashes with a “Could not load file or assembly” error when accessing my utility DLL.

    Apparently whatever missing code is in DWMAPI.DLL is not really accessed by my utility DLL since all functionality is there in my non-service application. It is just the Service application that bails out on the loading of the DLL.

    What is the difference between dynamic assembly loading for a .NET Windows Service application and a standard .NET Windows Application?

    Is there a way for me to set a config switch or add some code to my utility DLL so that dynamic assembly loading doesn’t crash the service app during load time?

    My other only recourse is to move the code from my utility DLL and place it directly into each of the applications.

    Thanks,

    GQ

  69. This is basically a reminder post, but you might find it useful. In the development I have been doing

  70. Yoganand says:

       hi i am running my asp.net ajax application in windows 2003 server with iis6 but everything is working fine in all the browsers but i am getting following error in Internet Explorer 7….

       MissingMethodException: Method not found

       any help?.

       thanks in advance.

       Yoganand

  71. Oliver Hausler says:

    Hi Suzanne,

    Again and again and again I’ve been plagued by assembly binding failures "The located assembly’s manifest definition with name [yourAssembly] does not match the assembly reference" or MissingMethodExceptions. After using fuslogvw and whatever, I still could not find any error on my side. I am having strongly-named assemblies and I am exclusively using project references in my solution; and there is no reason why references should break from time to time. (VS 2005 SP1 was no remedy, by the way.)

    –> There is something very intersting I found out today, which I haven’t found in any blog so far, and which I wanted to share with you and all others who are facing the same problem. I found that the defective solution without any modifications would compile and run perfectly, when I rename the base folder which contains it, or when I copy it into another folder, or when I run it on a different machine. The funny thing is, when I rename the folder back to the old names, the reference breaks again.

    Even though fuslogvw states to have loaded all current assembly versions, and even though all assembly versions in my bin folder are up-to-date, an older copy is loaded from somewhere, and I assume this happens after a file had been locked (an assumption based on when it happens).

    –> If anybody has an idea, especially if there might be another way like clearing a cache or whatever instead of renaming the solution folder (which isn’t best practice of solving this issue I believe), please let me know.

    oliver.hausler AT hausler.info

  72. Oliver Hausler says:

    Suzanne stated in another thread, that strongly-named assemblies aren’t updated in the download cache when the assembly version hasn’t changed. This leaded me to the conclusion, that calling "gacutil /cdl" to delete the download cache manually before each compilation would solve the problem, and bingo, the problem is gone.

  73. AnDrah says:

    Hi,

    I am looking for solving a problem with hosting a WinForm UserControl in an aspx page in ie6 / 7.

    The problem is not located in resolving the dll, because fuslogvw says the dll was successfully loaded, but in not displaying the form in the page on the client. All I can see is a little square as placeholder for the control.

    I can’t find any information about further debugging beyond this point. All hints on enabling DebugIEHost seem to only work in .NET 1.1 and older, but not in 2.0 and newer?!?

    All security issues I checked over and over again. The control is loading on one machine on the other it does not. On some machines one of the two controls I host in this application does load, the other on does not.

    I am only lokking for new input resolving this problem, becaus I really don’t know what to do further more.

    Every hint or link would be a great help for me.

    Thank you all

    Andreas

    andreas dot draheim at impuls-nbg dot de

  74. The conventional method of creating publisher policy (PP) assemblies becomes cumbersome when dealing

  75. Vincenzo Colluto says:

    hi i want to create a my application to check assembly binding failures. The objective is to use this application on a computer without sdk installed.

    You think this is possible? can you help me?

    thanks

  76. First, obviously, find the two types for which the cast failed and verify that they are the same type

  77. Say you’ve just installed some assemblies from a third party and now you’re seeing a MissingMethodException,

  78. Say you’re debugging your application and you see that version 1.0 of an assembly is being loaded when

  79. Volker says:

    Hi Suzanne

    this blog is an excellent source of knowledge.

    many postings here seem to be in a direction of it runs on one but not on the orther machine or it does not run on this machine.

    Maybe some links on basic things to check(from an enginering not dev perspective) would help

    Maybe such a tool does exist in some dev root of microsoft….

    This would solve many of my deployment problems and would be greatly appriciated !!!

  80. Volker says:

    OK, fusion is the solution

    but it doesn’t reveal to me why these things are so deeply covered under the surface.

    Not sure if there is any ressource e.g. book, internet, course which has all on dotnet aspects

    sorry if my english is here a bit rude

  81. Pierre says:

    Here is the situation. A .net executable scans a predefined directory for dll files. It will load each dll, enumerate the types and try to do a CreateInstance on each type implementing some known interface. This mechanism usually works fine, but sometimes a FileNotFound exception occurs.

    A debugging session showed the assembly is loaded correctly, then the CreateInstance causes the creation of an object located in this already loaded assembly. The runtime then tries to load the dll again. As the dlls are located in a predefined directory it cannot find them and raises this exception.

    After wondering why the runtime would try to load a dll it already has in memory, I decided to just manually copy them in the Debug directory of my project. Another Debug session, and this exception is gone, but a new one occurs System.IO.FileLoadException. The runtime seems to complain about this:

    “The located assembly’s manifest definition does not match the assembly reference.

    (Exception from HRESULT: 0x80131040)”

    Using your tutorial I have gone through the fusion logging troubleshooting, and found this:

    “Comparing the assembly name resulted in the mismatch: Revision Number”.

    Which seems odd to me as the dlls are projects I have compiled myself, and I have checked every copy of them located on my hard drive, and all the files are identical.

    (All those files have strong names too)

    Thanks in advance for your help.

  82. Gideon says:

    hi,

    I have a little pickle while loading my app. Would appreciate it so much if you could help! =)

    Checked the paths, and the logs created by fuslogvw

    I did use a batch ngen job to make native images of all my assemblies earlier.But i’ve uninstalled them, i checked them with ngen display <asm>

    interestingly, caspol complains “unable to load assembly”

    Heres the log for the main executable:

    http://pastebin.com/f3dd89ada

    the above assembly in turn should load 4 other assemblies, heres the log to one of them(since all of them are alike):

    http://pastebin.com/f715d7c5e

    Thanks so much

    Gideon

  83. Ramesh says:

    Hello everyone,

    This has been a very useful information. I am running into with assembly referencing and need some help. Any help is highly appreciated.

    I have two assemblies X and Y referencing a third assembly Z. X refers to Z(version 1.0) and Y refers to Z(version 1.1). Z defines a delegate StatusChangedEventHandler and a type in Y defines an event StatusChanged of type StatusChangedEventHandler.

    Now, the following line in X(a type in X) throws a MissingMethodException

    Y.StatusChanged += new StatusChangedEventHandler(OnStatusChanged);

    While debugging i see that both versions of Z are loaded.

    What would you think is happening. I am just stuck here.

  84. Max says:

    I am trying to implement a "normal" publisher policy. I have an assembly, that I created using ILMerge from another assembly (.net) and some other interop.*.dll files.

    The problem is that the fusion log tells me:

    WRN: Comparing the assembly name resulted in mismatch of Processor Architecture: Ref MSIL, Def Legacy.

    So basically the bindingRedirect is working, but the processorArchitecture between the policy assembly and the actual assembly is different.

    Now when I create the publisher policy I can control which platform to make an assembly (policy.*.dll) for, but I don’t know how I can get it to create a ‘Legacy’ architecture (IF there is such a thing at all). On the other hand, if I cannot change this policy assembly, I have not found a way how I can specify that the created dll (using ILMerge) has MSIL as platform (or any other one for that reason)

    Any ideas would help me a lot.

    Thanks a dozen for anyone who can answer this.

    Max

  85. Nonie Mouse says:

    Thanks!  Helped me get to the bottom of a problem w/0x80131040 I was struggling with.

  86. RajKumar says:

    Can We work with single Clr on Diffrent versions.

  87. Nick Anzano says:

    Hi Suzanne,

    I’m receiving this message from a function in SQL Server 2005 which calls .Net Assemblies:

    Msg 6522, Level 16, State 2, Line 1

    A .NET Framework error occurred during execution of user-defined routine or aggregate "acgCCEncrypt":

    System.IO.FileLoadException: Retrieving the COM class factory for component with CLSID {47DD5BC9-54B1-45BB-A7C4-678F529EDECE} failed due to the following error: 8007045a.

    System.IO.FileLoadException:

      at EncryptCC.EncryptCard(String CardNo)

    .

    Everything was fine for a few days, and then the function started throwing these errors.

  88. Mike Cripps says:

    Many thanks! This solved a problem I’d been having and the rest of the internet was being unhelpful about.

  89. Jitendra Mishra says:

    Hey Suzanne,

    Could you please help me out for I am getting

    System.IO.FileLoadException: Could not load file or assembly ‘Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

    I am using this dll in my test project

    The problem is that if I reference this dll in a separate project it works fine and gets loaded

    However if I reference in my existing test project then It throws the mentioned error

    I made sure to remove all the previous versions of Interop.shdocvw dlls and replaced it with that of System32 folder.

    Helping to resolve this will be highly appreciated

  90. Abramovicl says:

    Hi , i have some questions about you desing

    maybe you can give designer contacts?

  91. P K Rao says:

    Hi Suzanne.. this post was very useful. I found the problem which was troubling me for quite some time.. Alls ok now..

    Ta

    Rao

  92. Branchenbuch Magdeburg says:

    I have an error in IE7:

    MissingMethodException: Method not found

  93. Sunitha says:

    Hi,

    following steps resvoled my problem:

    Cleant IE cash and file.

    unregister asp .net aspnet_regiis -u

    register asp .net aspnet_regiis -i

    assign aspnet user to c:windowstemp

    Hope this help.s

  94. Joergen Bech says:

    I am experiencing assembly binding failures due to insufficient permissions to the Temporary ASP.NET Files folder.

    The application uses (web.config) Forms authentication with Impersonate = True and IIS Windows Integrated Authentication.

    According to ASP.NET Identity Matrix, this means that the WindowsIdentity resolves to DomainUserName and according to ASP.NET Required Access Control Lists (ACLs), the WindowsIdentity requires read/write permissions to the Temporary ASP.NET Files folder.

    Using the Fusion log viewer, I can confirm that the assembly binding failure is due to DomainUserName (belonging to the “Users” group in security) only having read permissions to this folder, but not write permissions.

    The questions are:

    Are there any security implications of assigning write permissions to the Temporary ASP.Net Files folder?

    Is such a server configuration change commonly used? If not, why would WindowsIdentity resolve to DomainUserName for this combination of web.config settings – or should this combination not be used in this context?

    Note: The problem only occurs if a non-admin user is the first to hit the page. If the assembly has already been compiled and stored in Temporary ASP.NET Files due to an admin user hitting the page, there are no problems for subsequent users. I do NOT wish to place the assemblies in the GAC.

  95. Sudeep says:

    I have the following problems :

    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 ‘ADODB’ or one of its dependencies. Access is denied.

    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 ‘ADODB’ could not be loaded.

    === Pre-bind state information ===

    LOG: User = Unknown

    LOG: DisplayName = ADODB

    (Partial)

    LOG: Appbase = file:///D:/Precision/Published/Web/Applications/DxCG.Web.Shell/DxCG.Web.Shell/

    LOG: Initial PrivatePath = D:PrecisionPublishedWebApplicationsDxCG.Web.ShellDxCG.Web.Shellbin

    Calling assembly : (Unknown).

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: D:PrecisionPublishedWebApplicationsDxCG.Web.ShellDxCG.Web.Shellweb.config

    LOG: Using host configuration file: \?c:windowsmicrosoft.netframeworkv2.0.50727aspnet.config

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.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:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/f86d14c1/8f04ea0b/ADODB.DLL.

    LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/f86d14c1/8f04ea0b/ADODB/ADODB.DLL.

    LOG: Attempting download of new URL file:///D:/Precision/Published/Web/Applications/DxCG.Web.Shell/DxCG.Web.Shell/bin/ADODB.DLL.

    LOG: Using application configuration file: D:PrecisionPublishedWebApplicationsDxCG.Web.ShellDxCG.Web.Shellweb.config

    LOG: Using host configuration file: \?c:windowsmicrosoft.netframeworkv2.0.50727aspnet.config

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.config.

    LOG: Post-policy reference: ADODB, Version=2.8.0.0, Culture=neutral, PublicKeyToken=5121ca9351a1ae02

    ERR: Failed to complete setup of assembly (hr = 0x80070005). Probing terminated.

    Stack Trace:

    [FileLoadException: Could not load file or assembly ‘ADODB’ or one of its dependencies. Access is denied.]

    ……….

    Can you figure out what is the problem ?

    I have .NET 3.5 installed. I have given all the permission but still not working.

    Is it ADODB version peroblem or MSSQL server problem ?

  96. Nikunj Banker says:

    I am getting this error in the fusion log viewer, when i run my application. could you please help me see figure this out?

    *** Assembly Binder Log Entry  (16-Sep-2009 @ 1:52:33 PM) ***

    The operation failed.

    Bind result: hr = 0x80131040. No description available.

    Assembly manager loaded from:  C:WINDOWSMicrosoft.NETFrameworkv2.0.50727mscorwks.dll

    Running under executable  C:Program FilesMicrosoft OfficeOffice12WINWORD.EXE

    — A detailed error log follows.

    === Pre-bind state information ===

    LOG: User = DECOSSOFTDEVnikunj

    LOG: DisplayName = DecosOdmaAssembly, Version=30.0.0.25144, Culture=neutral, PublicKeyToken=9f8142849d324fd0

    (Fully-specified)

    LOG: Appbase = file:///C:/Program Files/Microsoft Office/Office12/

    LOG: Initial PrivatePath = NULL

    LOG: Dynamic Base = NULL

    LOG: Cache Base = NULL

    LOG: AppName = NULL

    Calling assembly : (Unknown).

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: C:Program FilesMicrosoft OfficeOffice12WINWORD.EXE.Config

    LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv2.0.50727configmachine.config.

    LOG: Post-policy reference: DecosOdmaAssembly, Version=30.0.0.25144, Culture=neutral, PublicKeyToken=9f8142849d324fd0

    LOG: GAC Lookup was unsuccessful.

    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Office/Office12/DecosOdmaAssembly.DLL.

    LOG: Assembly download was successful. Attempting setup of file: C:Program FilesMicrosoft OfficeOffice12DecosOdmaAssembly.dll

    LOG: Entering run-from-source setup phase.

    LOG: Assembly Name is: DecosOdmaAssembly, Version=30.50.108.24769, Culture=neutral, PublicKeyToken=9f8142849d324fd0

    WRN: Comparing the assembly name resulted in the mismatch: Minor Version

    ERR: The assembly reference did not match the assembly definition found.

    ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

    Thanks & Regards,

    Nikunj Banker

  97. Rollek says:

    Do you know how to get the fusion log running .net on a mobile device? I do have some typeLoadException and i am curious if fusion log may help on .net compact framework 3.5!?

    Thanks & Cheers Rollek

  98. andre says:

    I have a big problem

    Error: BC31019: Unable to write to output file "___.pdb": Unkown error.

    I cannot run/debug/release the application

    the error appeared suddenly during the Build of one project.

    Deleting the obj-Folder didnt help, I found no useful solutions in the web.

    Please help me!