Error while trying to run project:The module was expected to contain an assembly manifest

后端 未结 6 492
谎友^
谎友^ 2020-12-03 21:43

When I try to run the project it says:

Error while trying to run project:could not load file or assembly \'Project.exe\' or one of its depend

相关标签:
6条回答
  • 2020-12-03 22:01

    i just resolve this by problem by restarting System as well in project properties i set to multi users as well in combo box start option.hope this will help u.

    0 讨论(0)
  • 2020-12-03 22:03

    I have the same problem when I use Vs2012 utimate to publish Asp.net Mvc4, then upload dll to server. I fixed it by build code as Release mode then upload all dll in bin folder to server.

    0 讨论(0)
  • 2020-12-03 22:06

    IN my case it get fixed by just going to project properties and set-->startup object projectname.program and build->platform target--> x86.

    0 讨论(0)
  • 2020-12-03 22:17

    In my case I just change Target Framework(.Net Framework 4) in Project Properties. It solves the problem.

    0 讨论(0)
  • 2020-12-03 22:19

    The module was expected to contain an assembly manifest

    It is a low-level assembly loading problem. The CLR has located a file with the right name but when it tries to load the assembly, it finds out that the file doesn't contain a proper manifest. A .NET assembly must contain a manifest, it contains metadata that describes the assembly, listing the types in the assembly, etc.

    If you have no clue what EXE or DLL might be the troublemaker then you can use the Fuslogvw.exe utility:

    1. Start it from the "Visual Studio Command Prompt".
    2. Click the "Settings" button and click the "Log binding failures to disk" radio button.
    3. Switch back to VS and start the program and wait for the exception to occur.
    4. Back to Fuslogvw, click the "Refresh" button and double-click the added entry.
    5. It shows you the file it found.

    Several possibilities, a common one these days is to trying to load a .NET 4 assembly with an EXE that asked for CLR version 2. That requires an app.exe.config file that forces CLR 4 to be used.

    0 讨论(0)
  • 2020-12-03 22:23

    0xc000007b is "STATUS_INVALID_IMAGE_FORMAT". From experience, this points me to the project properties. A few things worth checking out:

    • Check to see if all the build options are set to either x86 or x64, depending on your system architecture, or AnyCPU.
    • If you're using dlls, consider whether they were compiled for your target architecture or not. If not, then recompile them accordingly or get them in the right version from wherever you got them.
    • Finally, check if your project assembly and loaded assemblies have different names. That seems to make things go boom as well.
    0 讨论(0)
提交回复
热议问题