开发者

Application Failed to Initialize Properly

We have a project built with vs2010 which utilizes a .dll with managed code. I've built the .dll in vs2010, target Framework .NET 4.0 (tried Client Profile as well), which is the o开发者_如何学Cnly option 2010 gives you to use. When I go to run it, it can't initialize and I assume it's some incompatibility...but I have no idea what it would be. Does anyone have any ideas?

Also, I have downloaded a hotfix which allows you to do Incremental Managed Builds (originally it wasn't a feature in 2010)

Thanks!


Exception 0xc000007b (STATUS_INVALID_IMAGE_FORMAT) is almost always generated on the 64-bit version of Windows. Because your program is running in 64-bit mode and trying to load a DLL that contains unmanaged 32-bit code. Or the other way around.

Make sure the managed assembly was built with the Platform Target set to Any CPU. That isn't the default anymore in VS2010. Project + Properties, Build tab, Platform target setting. Be sure to change it for both the Debug and the Release configuration.

If you have no clue what DLL it might be then observe the program loading the DLL with the SysInternals' ProcMon utility.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜