Could not load file or assembly exception

前端 未结 13 1998
情书的邮戳
情书的邮戳 2020-11-30 09:51

Any thoughts on what might be causing this exception?

I have a webservice proj, when i load the link i get

Could not load file or assembly \'I

相关标签:
13条回答
  • 2020-11-30 10:17

    An alternate to this issue is to change the build properties of your project.

    For vb.net got to Project--> Properties --> Compile --> Advanced Compile Options Here change the target CPU

    0 讨论(0)
  • 2020-11-30 10:21

    Ok the answer is Got to Start->Run->type inetmgr and on the left application pools, select DefaultAppPool and the virtual directory name of the app and for both make sure to enable 32 -bit applications to true, am using IIS7.0 and windows 7 64-bit. enter image description here

    0 讨论(0)
  • 2020-11-30 10:21

    I finally got around this exception by deleting the entry in the applicationhost.config for IIS Express (C:\Users{username}\Documents\IISExpress\config\applicationhost.config).

    I had also stopped the IIS express instance, cleaned and rebuilt in VS. Then change the config file, then restarted VS 2013.

    0 讨论(0)
  • 2020-11-30 10:25

    My Error fixed, with change of build option to:

    in my C#.net win project:

    Properties > Build > Platform Target > 'x86'
    

    I accidentally change its value to 'Any CPU' and forget to change it.

    It's work for me

    0 讨论(0)
  • 2020-11-30 10:26

    What worked for me is doing a BIOS update on my machine!

    0 讨论(0)
  • 2020-11-30 10:28

    The most common cause in my experience is that you made a change to a referenced assembly that requires rebuilding other assemblies using that changed assembly, and didn't rebuild them.

    Example #1: you have an EXE that references a DLL. You add something to the referenced DLL that adds a new method, new parameter, whatever. This changes the external "signature" of the DLL; that is, the location in memory of various entry points. You don't rebuild the EXE. When the EXE loads and tries to reference the new DLL, its old entry point is no longer valid, so it cannot execute the code it needs.

    Example #2: you have an x86 EXE that references a DLL. This DLL must also be compiled for x86 (or Any CPU). If you rebuild it for x64, the EXE, running in a 32-bit space, will not understand the instructions and register references to the 64-bit "extended" world, and will cry uncle.

    0 讨论(0)
提交回复
热议问题