0

I am creating a Windows Form application and trying to debug it. It displays the following error:

error while trying to run project could not load file or assembly or one of its dependencies

I updated and repaired my Visual Studio but error is same. When I go to bin\debug and try to run .exe it shows this error:

the application was unable to start correctly (0xc000007b)

11
  • You are missing one of the required assemblies in your project. Show us some more details and we can help you better.
    – Dhrumil
    May 26, 2015 at 9:27
  • Check for the name of the assembly if you can see it in the build error or console window.
    – Dhrumil
    May 26, 2015 at 9:31
  • If remember well, 0xc000007b means that you it's trying to load an assembly with a different target from the running one. Probably, you are running an x64 application that is trying to load an x86 assembly. You can try to open your .exe with Dependency Walker and check if one ore more of the dependencies have a different target. Anyway, you will probably need to repair your .NET Framework May 26, 2015 at 9:34
  • How can i checked assembly name give me details i did found anything like that May 26, 2015 at 9:39
  • @ChathurangaEdirisingha So probably is the opposite: You compiled an x86/AnyCPU application that is trying to load an x64 assembly. Or you compilation target is x64 May 26, 2015 at 9:45

1 Answer 1

0

0xc000007b means STATUS_INVALID_IMAGE_FORMAT, this is an indication that your x86 application tries to load an x64 dll, or that your application target is x64, to check this you can look in the Project properties->Build->Target Platform Platform Target Checking

If your platform target is not x64 you can check your application dependencies with Dependency Walker and look if one or more of them is a 64 bit dll.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.