[Mono-list] linkage question

Rob Weiss rweiss at chesapeakebay.net
Fri Feb 6 08:03:01 EST 2009


Do you have a reference to the Full.dll in your project?

Make sure that full.dll is in the same dir as the execution dir.

How did you compile the app? Can you post the code?

If you can get your hands on MS Visual Studio IDE, write the app, compile
the app and debug the app there first, then just copy the output bin to the
target machine. This is how I develop for the mono platform right now with
no issues. Plus VS IDE has alot of the RAD stuff built in, so its harder to
make a mistake, if you are new to the language - IMHO.


Ryan Heaton wrote:
> 
> Apologies in advance for what should be a pretty basic question.  I'm new
> at C# and mono development.
> 
> So I've got some library that I've compiled, in my case it's called
> "full.dll". In that library is defined a class,
> "Org.Codehaus.Enunciate.Samples.Genealogy.Services.SourceService".
> 
> Now I want to write an executable that uses an instance of
> Org.Codehaus.Enunciate.Samples.Genealogy.Services.SourceService.  I
> compile that to a file "full.exe".  Now, when I try to run it, e.g.:
> 
> mono full.exe
> 
> I get an error saying that
> "Org.Codehaus.Enunciate.Samples.Genealogy.Services.SourceService" can't be
> loaded:
> 
> ** (full.exe:19687): WARNING **: The class
> Org.Codehaus.Enunciate.Samples.Genealogy.Services.SourceService could not
> be loaded, used in full, Version=0.0.0.0, Culture=neutral
> 
> Unhandled Exception: System.TypeLoadException: Could not load type
> 'System.InvalidProgramException' from assembly 'mscorlib, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089'.
> 
> 
> So I guess it's not linking the dll to the exe at runtime.  What's my
> problem? How do I reference that dll when I invoke mono?
> 
> I'm developing on Ubuntu Intrepid.
> 

-- 
View this message in context: http://www.nabble.com/linkage-question-tp21863604p21872011.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list