diff --git a/cs/config/Make.rules.mak.cs b/cs/config/Make.rules.mak.cs index 5501714..197af28 100644 --- a/cs/config/Make.rules.mak.cs +++ b/cs/config/Make.rules.mak.cs @@ -183,7 +183,7 @@ MCSFLAGS = $(MCSFLAGS) -optimize+ #MCSFLAGS = $(MCSFLAGS) -define:CODE_ANALYSIS !if "$(FRAMEWORK)" == "3.5" -MCSFLAGS = $(MCSFLAGS) /noconfig /nostdlib+ +MCSFLAGS = $(MCSFLAGS) /noconfig /nostdlib+ /define:DOTNET3_5 MCSFLAGS = $(MCSFLAGS) /reference:"$(FRAMEWORKDIR)\v2.0.50727\mscorlib.dll" MCSFLAGS = $(MCSFLAGS) /reference:"$(FRAMEWORKDIR)\v2.0.50727\System.dll" MCSFLAGS = $(MCSFLAGS) /reference:"$(FRAMEWORKDIR)\v2.0.50727\System.Data.dll" diff --git a/cs/src/Ice/Network.cs b/cs/src/Ice/Network.cs index b2fa6cc..0b080e2 100644 --- a/cs/src/Ice/Network.cs +++ b/cs/src/Ice/Network.cs @@ -459,7 +459,10 @@ namespace IceInternal public static Socket createServerSocket(bool udp, AddressFamily family, int protocol) { Socket socket = createSocket(udp, family); -# if !COMPACT && !UNITY && !__MonoCS__ && !SILVERLIGHT +# if !COMPACT && !UNITY && !__MonoCS__ && !SILVERLIGHT && !DOTNET3_5 + // + // The IPv6Only enumerator was added in .NET 4. + // if(family == AddressFamily.InterNetworkV6 && protocol != EnableIPv4) { try diff --git a/cs/test/Ice/binding/AllTests.cs b/cs/test/Ice/binding/AllTests.cs index 92f29fa..d378ea8 100644 --- a/cs/test/Ice/binding/AllTests.cs +++ b/cs/test/Ice/binding/AllTests.cs @@ -850,7 +850,7 @@ public class AllTests : TestCommon.TestApp WriteLine("ok"); } -#if !SILVERLIGHT && !COMPACT && !UNITY +#if !SILVERLIGHT && !COMPACT && !UNITY && !DOTNET3_5 { Write("testing ipv4 & ipv6 connections... "); Flush();