System.IO.FileNotFoundException error when starting Windows Phone 8 application

I have a Windows Runtime component that uses some native libraries ( PJSIP library ). This component is used in a Windows Phone 8 app and when I try to call a function from a native component I get the following error:

An exception of type 'System.IO.FileNotFoundException' occurred in TestingApp.DLL but was not handled in user code

      

with the source (in detail of the exception) in mscorlib.

Can anyone point out what might be causing this error and how can I find out what is actually missing? When I try to set a breakpoint in my Windows Runtime Component, the breakpoint appears as disabled at runtime.

Regards, Tamas

+3


source to share


4 answers


Add the missing one dll

to the project (like adding a new file) and mark it as content. Then link to the dll from that location. This might solve your problem.



I am assuming it does not work as it is not deployed to your application.

0


source


In Visual studio, from the Debug menu, choose Exceptions and then in the dialog that appears, enable Abandoned for Common Language Environment Exceptions



Then rerun the application, Visual Studio should break at the line in the code throwing the Null Exception.

0


source


If you are linking to a native library, double check if you are linking to C ++ Runtime. In your project in Solution Explorer, right click on the link> Add Reference ... Go to Extensions and check the Visual C ++ Runtime Package.

0


source


Check the linked library file, it should be an import library for the DLL file.

The import library (.lib) file contains information that the linker must resolve to external references to exported DLLs so that the system can find the specified DLLs and exported DLLs at runtime.

When the application starts, it finds the DLLs according to the import library, but there are no such DLLs, so C # throws a FileNotFoundException. Make sure to reference the static library

0


source







All Articles