I compiled test.cs (which links to a third-party library) using the dmcs for Mac and the following command line program:
dmcs /out:program.exe test.cs /target:exe /reference:/Users/kevin/path/to/bin/Debug/project.dll
This compiled without problems (excluding the / reference argument causes problems). This created the executable program.exe in the current directory. When I tried to run it as follows:
mono program.exe
I got the following error:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'project, Version=3.4.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The only way to solve this problem is to copy the project.dll file to the directory containing the program.exe file. As soon as I copied project.dll to the same directory, the program worked correctly.
Is there an additional argument that I can pass in mono to specify a DLL in another program directory? Or, is there a flag that I can pass to dmcs to force it to compile the DLL directly into a binary file?
source share