I'm writing a program in monomac
to ftp files to a server. I used the FtpWebRequest
as
FtpWebRequest request =(FtpWebRequest)WebRequest.Create("ftp://serverip/filename");
When I'm running this code in monodevelop
its running properly. But when I release this and runs outside monodevelop
I get the error "An Exception as thrown by the type initialize for System.Net.WebRequest
.
I researched for this error and found it has problem with the library libc.dylib. If I change the DYLD_FALLBACK_LIBRARY_PATH in launch script of the app(AppBundle/MacOs/AppName edit with TextEdit)
as
export DYLD_FALLBACK_LIBRARY_PATH="$MONO_FRAMEWORK_PATH/lib:$DYLD_FALLBACK_LIBRARY_PATH:/usr/lib"
(added /usr/lib)
then it is sending the files. But I have to install mono framework in all system to run this app. Once i create a mac installer package i cannot edit the the launch script. I tried copying libc.dylib
file from /usr/lib
to Appbundle(App/MonoBundle/)
but still the error exists.
Can anyone help me?