[Mono-list] linkage question

Rob Weiss rweiss at chesapeakebay.net
Fri Feb 6 08:04:18 EST 2009


Ahhh... make sure that the Full.exe and the Full.dll are NOT the same class
name or they are in different namspaces, if they are.


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-tp21863604p21872028.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list