You built an application using Visual Stuido 2005, you also have a Platform Invoke code so that your managed code can call unmanaged code stored in your platform invoke DLL, and in order to test it on another machine, you copy the bin/debug folder there. The test machine does not have the Visual Studio 2005.
As soon as you run the program, and when your code calls the platform invoke code the following error message occurs,
Unable to load DLL 'Some.DLL': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
Possible Cause and Fix:
This article is still being completed. But here is what I have figured out so far:
Apparently, when you build a code that includes a platform invokaction code (i.e., calling a C++ library), there is a run-time (CRT) code to be included, and if you are doing this on a debug code then there are some very complex issues.
There is one person on the web that solved this issue by using the release build. I am going to try that approach.
If that's not what you want, here is a detailed information about this.
(This article will be updated further as I find the final solution.)
Post a Comment