[Mono-dev] File not found error when using Activator.CreateInstanceFrom()
mguman at knology.net
Mon Jan 17 11:58:00 EST 2011
Hey John, thanks for the reply. I was compiling the c# test app and test
dlls above from within Visual Studio 2005, taking default options. Options
listed below, although seems this is OBE for you now....
The PATH variable was one of the first things that I checked when I first
ran into this issue. Setting this does indeed work for my small sample
application yet does *not* work for my 'real' application, which is more
complex. It performs the PInvokefrom a plug-in assembly which was loaded via
@Assembly.LoadFrom(). Maybe this is confusing win mono. Unfortunately, I
cannot post detailed code of the real application. I'll have to gin up
another 'test' example. I'll try to post a zip with new sample (see below).
I ran into issues posting attachments to this board.
I had also hoped that the path specified by the DllImport() call would
suffice for the dependent dll to be found. Seems to work this way running
under .NET so why is this not working under mono 2.8? Wonder what exactly
the difference is between the two....??
The MSVS 2005 command line compile options for the C++ dlls are:
/O2 /D "_WINDLL" /GF /FD /EHsc /MD /Gy /Fo".\Release/" /Fd".\Release/"
/nologo /c /TP /errorReport:prompt
/O2 /Ob1 /I "..\Environ" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL"
"ENVIRONMENT_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_WINDLL" /D "_MBCS"
/GF /FD /MD /Gy /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /TP
The MSVS linker command line options are:
/OUT:"..\Release/Test_Native.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"..
\release" /DLL /MANIFEST /MANIFESTFILE:"Debug
\Test_Native.dll.intermediate.manifest" /ERRORREPORT:PROMPT Environ.lib
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
/OUT:"..\Release/Environ.dll" /NOLOGO /DLL /MANIFEST
/ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
View this message in context: http://mono.1490590.n4.nabble.com/File-not-found-error-when-using-Activator-CreateInstanceFrom-tp3064104p3221233.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list