[MonoDevelop] Further problems with libraries and assemblies

dsmithers at talktalk.net dsmithers at talktalk.net
Tue Nov 20 12:36:59 EST 2007

I am now using MonoDevelop 0.15 (0.17 is not stable with Ubuntu 7.04)

I am still struggling with libraries, and have found a way that works most of the time.
I have written and compiled a library using 

gmcs -target:module -out:lib/mysock.dll src/mysock.cs

I have populated an AssemblyInfo.cs file and compiled it with 

gmsc -target:lib -out:lib/mysocklib.dll -addmodule:lib/mysock.dll src/AssemblyInfo.cs

As well as a line to a key file and various other strings, AssemblyInfo.cs contained the line
[assembly: AssemblyVersion("1.0.*.*")] 

but I found this to be very erratic. I kept getting invalid assembly info compile errors after rebuilding the library.
I changed it to read 

[assembly: AssemblyVersion("")] 

I also found that I needed to add a link to mysock.dll to the bin directory containing my application.

Does this all look sensible? 
How can I specify which versions of an assembly are compatible with my application?

I also _sometimes_ have problems finding the System.Net.Sockets.UdpClient::set_EnableBroadcast when I run the binary. There is no compilation error, but I get a System.MissingMethodException raised. I say sometimes as some builds run correctly and the next build might fail. Usually rebuilding the library is sufficient to sort this out.

The error is as follows:

Unhandled exception: System.MissingMethodException: Method not found 'System.Net.Sockets.UdpClient::set_EnableBroadcast'
? at <0x00000> <unknown method>
? at AGSocket.CSocket.create(Int32 port, System.Byte[] address, AGSocket.FCallback cb) [0x00000]
? at Main..ctor() [0x00000]
? at gtkclient.MainClass.Main (System.string[] args) [0x00000]

I have a native C# application that uses this library that behaves correctly.

Is there some path variable that I need to set?
What about MONO_PATH? the runtime errors sometimes mention this, but the main mono documentation deprecates its use.

thanks for all your help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20071120/175d92b4/attachment-0001.html 

More information about the Monodevelop-list mailing list