[Moonlight-list] System.Net.Sockets.AddressFamily Conflicts
sebastien.pouliot at gmail.com
Thu Jan 7 19:31:03 EST 2010
On Thu, 2010-01-07 at 15:53 -0800, TheNut wrote:
> FYI this is for Mono 2.6.1 (2.1 assemblies), as well as the latest Moonlight
> 2.0 runtime. I'm attempting to port and build my socket library from SL in
There is no "as well as Moonlight" as far as 2.1 assemblies are
concerned. Mono (well mcs) itself provides the base code for some - but
the only "real" (as in shipping) code is build by Moonlight (i.e. the
raw 2.1 assemblies from mcs are unusable).
> When I go to compile my project, smcs reports that AddressFamily is defined
> in two assemblies, System.dll and System.Net.dll, both using the same
> namespace. I compared it against MS official SL 3.0 assemblies and
> System.dll should not contain the System.Net.Sockets namespace, yet
> moonlight does and includes definitions for unofficially supported protocols
> as well.
Please look at the path of the assemblies you're comparing from. I doubt
it's coming from Moonlight (at least for System.dll) since we (and our
build bots) would be unable to build Moonlight in this case.
> To test this, you can compile the following simple class:
> using System.Net.Sockets;
> public class MyClass
> public test ()
> Socket sock = new Socket(AddressFamily.InterNetwork,
> SocketType.Stream, Protocol.Tcp);
> Compile: smcs test.cs
> You will get the error that AddressFamily is defined in two locations.
You're likely using System.dll from 2.0 and System.Net.dll from 2.1
(e.g. a path issue). Make sure the right assemblies are being referenced
by the compiler.
More information about the Moonlight-list