Author: jgomes
Date: Sat Aug 21 00:55:01 2010
New Revision: 987681

URL: http://svn.apache.org/viewvc?rev=987681&view=rev
Log:
Use the C# 3.5 compiler to target .NET 2.0 runtime to take advantage of the 
latest language features.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
    
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
    
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml 
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml Sat Aug 
21 00:55:01 2010
@@ -44,6 +44,7 @@
     <property name="current.build.config"    value="${if(project.release.type 
== 'release', 'release', 'debug')}" overwrite="false" />
     <property name="current.build.framework" 
value="${framework::get-target-framework()}" overwrite="false" />
     <property name="current.build.defines"   value="${build.defines}" />
+    <!-- TODO: Add net-4.0 once NAnt supports it. -->
     <property name="build.framework.strings" 
value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" 
unless="${property::exists('build.framework.strings')}"/>
     <property name="current.build.framework.assembly.dir" 
value="${framework::get-assembly-directory(framework::get-target-framework())}" 
dynamic="true" />
 
@@ -115,7 +116,7 @@
         </if>
 
         <property name="current.build.keysign" 
value="${current.build.framework.sign}" />
-        <property name="build.bin.dir" 
value="${build.dir}/${nant.settings.currentframework}/${current.build.config}" 
/>
+        <property name="build.bin.dir" 
value="${build.dir}/${current.build.framework}/${current.build.config}" />
         <if test="${not(build.skip)}">
             <echo message="Doing ${if(current.build.keysign,'a signed','an 
unsigned')} ${current.build.config} build for the 
${current.build.framework.name} framework" />
             <mkdir dir="${build.bin.dir}" />
@@ -204,8 +205,9 @@
         <property name="current.build.framework.sign" value="true" />
         <property name="link.sdkdoc.version" value="SDK_v2_0" />
         <property name="link.sdkdoc.web" value="true" />
-        <if test="${framework::exists(current.build.framework)}">
-            <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+        <!-- Use the .NET 3.5 compiler for improved language features.  Still 
targets same runtime. -->
+        <if test="${framework::exists('net-3.5')}">
+            <property name="nant.settings.currentframework" value="net-3.5" />
         </if>
     </target>
 
@@ -221,6 +223,16 @@
         </if>
     </target>
 
+    <target name="set-net-4.0-framework-configuration">
+        <property name="current.build.framework" value="net-4.0" />
+        <property name="current.build.framework.name" value=".NET 4.0" />
+        <property name="current.build.defines" 
value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" dynamic="true" />
+        <property name="current.build.framework.sign" value="true" />
+        <property name="link.sdkdoc.version" value="SDK_v6_1" />
+        <property name="link.sdkdoc.web" value="true" />
+        <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+    </target>
+
     <target name="set-netcf-2.0-framework-configuration">
         <property name="current.build.framework" value="netcf-2.0" />
         <property name="current.build.framework.name" value=".NET Compact 
Framework 2.0" />

Modified: 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
 Sat Aug 21 00:55:01 2010
@@ -934,10 +934,9 @@ namespace Apache.NMS.ActiveMQ.Transport.
                                                                        break;
                                                                }
 
-                                                               
Tracer.DebugFormat("Attempting connect to: {0}", uri);
-
                                                                if(asyncConnect)
                                                                {
+                                                                       
Tracer.DebugFormat("Attempting async connect to: {0}", uri);
                                                                        // set 
connector up
                                                                        
Connector connector = new Connector(
                                                                                
delegate(ITransport transportToUse, Uri uriToUse)
@@ -968,7 +967,7 @@ namespace Apache.NMS.ActiveMQ.Transport.
                                                                        // 
synchronous connect
                                                                        try
                                                                        {
-                                                                               
Tracer.DebugFormat("Attempting connect to: {0}", uri.ToString());
+                                                                               
Tracer.DebugFormat("Attempting sync connect to: {0}", uri);
                                                                                
transport = TransportFactory.CompositeConnect(uri);
                                                                                
chosenUri = transport.RemoteAddress;
                                                                                
break;

Modified: 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
 Sat Aug 21 00:55:01 2010
@@ -457,7 +457,7 @@ namespace Apache.NMS.ActiveMQ.Test
                                Thread.Sleep(1000);
 
                                mock = transport.Narrow(typeof(MockTransport)) 
as MockTransport;
-                               Assert.IsNotNull(mock);
+                               Assert.IsNotNull(mock, "Error reconnecting to 
failover broker.");
                                Assert.AreEqual(61616, mock.RemoteAddress.Port);
                                Assert.AreEqual("Reconnected", mock.Name);
                        }

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml Sat Aug 21 
00:55:01 2010
@@ -44,6 +44,7 @@
     <property name="current.build.config"    value="${if(project.release.type 
== 'release', 'release', 'debug')}" overwrite="false" />
     <property name="current.build.framework" 
value="${framework::get-target-framework()}" overwrite="false" />
     <property name="current.build.defines"   value="${build.defines}" />
+    <!-- TODO: Add net-4.0 once NAnt supports it. -->
     <property name="build.framework.strings" 
value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" 
unless="${property::exists('build.framework.strings')}"/>
     <property name="current.build.framework.assembly.dir" 
value="${framework::get-assembly-directory(framework::get-target-framework())}" 
dynamic="true" />
 
@@ -115,7 +116,7 @@
         </if>
 
         <property name="current.build.keysign" 
value="${current.build.framework.sign}" />
-        <property name="build.bin.dir" 
value="${build.dir}/${nant.settings.currentframework}/${current.build.config}" 
/>
+        <property name="build.bin.dir" 
value="${build.dir}/${current.build.framework}/${current.build.config}" />
         <if test="${not(build.skip)}">
             <echo message="Doing ${if(current.build.keysign,'a signed','an 
unsigned')} ${current.build.config} build for the 
${current.build.framework.name} framework" />
             <mkdir dir="${build.bin.dir}" />
@@ -204,8 +205,9 @@
         <property name="current.build.framework.sign" value="true" />
         <property name="link.sdkdoc.version" value="SDK_v2_0" />
         <property name="link.sdkdoc.web" value="true" />
-        <if test="${framework::exists(current.build.framework)}">
-            <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+        <!-- Use the .NET 3.5 compiler for improved language features.  Still 
targets same runtime. -->
+        <if test="${framework::exists('net-3.5')}">
+            <property name="nant.settings.currentframework" value="net-3.5" />
         </if>
     </target>
 
@@ -221,6 +223,16 @@
         </if>
     </target>
 
+    <target name="set-net-4.0-framework-configuration">
+        <property name="current.build.framework" value="net-4.0" />
+        <property name="current.build.framework.name" value=".NET 4.0" />
+        <property name="current.build.defines" 
value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" dynamic="true" />
+        <property name="current.build.framework.sign" value="true" />
+        <property name="link.sdkdoc.version" value="SDK_v6_1" />
+        <property name="link.sdkdoc.web" value="true" />
+        <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+    </target>
+
     <target name="set-netcf-2.0-framework-configuration">
         <property name="current.build.framework" value="netcf-2.0" />
         <property name="current.build.framework.name" value=".NET Compact 
Framework 2.0" />

Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml Sat Aug 21 
00:55:01 2010
@@ -44,6 +44,7 @@
     <property name="current.build.config"    value="${if(project.release.type 
== 'release', 'release', 'debug')}" overwrite="false" />
     <property name="current.build.framework" 
value="${framework::get-target-framework()}" overwrite="false" />
     <property name="current.build.defines"   value="${build.defines}" />
+    <!-- TODO: Add net-4.0 once NAnt supports it. -->
     <property name="build.framework.strings" 
value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" 
unless="${property::exists('build.framework.strings')}"/>
     <property name="current.build.framework.assembly.dir" 
value="${framework::get-assembly-directory(framework::get-target-framework())}" 
dynamic="true" />
 
@@ -115,7 +116,7 @@
         </if>
 
         <property name="current.build.keysign" 
value="${current.build.framework.sign}" />
-        <property name="build.bin.dir" 
value="${build.dir}/${nant.settings.currentframework}/${current.build.config}" 
/>
+        <property name="build.bin.dir" 
value="${build.dir}/${current.build.framework}/${current.build.config}" />
         <if test="${not(build.skip)}">
             <echo message="Doing ${if(current.build.keysign,'a signed','an 
unsigned')} ${current.build.config} build for the 
${current.build.framework.name} framework" />
             <mkdir dir="${build.bin.dir}" />
@@ -204,8 +205,9 @@
         <property name="current.build.framework.sign" value="true" />
         <property name="link.sdkdoc.version" value="SDK_v2_0" />
         <property name="link.sdkdoc.web" value="true" />
-        <if test="${framework::exists(current.build.framework)}">
-            <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+        <!-- Use the .NET 3.5 compiler for improved language features.  Still 
targets same runtime. -->
+        <if test="${framework::exists('net-3.5')}">
+            <property name="nant.settings.currentframework" value="net-3.5" />
         </if>
     </target>
 
@@ -221,6 +223,16 @@
         </if>
     </target>
 
+    <target name="set-net-4.0-framework-configuration">
+        <property name="current.build.framework" value="net-4.0" />
+        <property name="current.build.framework.name" value=".NET 4.0" />
+        <property name="current.build.defines" 
value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" dynamic="true" />
+        <property name="current.build.framework.sign" value="true" />
+        <property name="link.sdkdoc.version" value="SDK_v6_1" />
+        <property name="link.sdkdoc.web" value="true" />
+        <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+    </target>
+
     <target name="set-netcf-2.0-framework-configuration">
         <property name="current.build.framework" value="netcf-2.0" />
         <property name="current.build.framework.name" value=".NET Compact 
Framework 2.0" />

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml Sat Aug 21 
00:55:01 2010
@@ -44,6 +44,7 @@
     <property name="current.build.config"    value="${if(project.release.type 
== 'release', 'release', 'debug')}" overwrite="false" />
     <property name="current.build.framework" 
value="${framework::get-target-framework()}" overwrite="false" />
     <property name="current.build.defines"   value="${build.defines}" />
+    <!-- TODO: Add net-4.0 once NAnt supports it. -->
     <property name="build.framework.strings" 
value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" 
unless="${property::exists('build.framework.strings')}"/>
     <property name="current.build.framework.assembly.dir" 
value="${framework::get-assembly-directory(framework::get-target-framework())}" 
dynamic="true" />
 
@@ -115,7 +116,7 @@
         </if>
 
         <property name="current.build.keysign" 
value="${current.build.framework.sign}" />
-        <property name="build.bin.dir" 
value="${build.dir}/${nant.settings.currentframework}/${current.build.config}" 
/>
+        <property name="build.bin.dir" 
value="${build.dir}/${current.build.framework}/${current.build.config}" />
         <if test="${not(build.skip)}">
             <echo message="Doing ${if(current.build.keysign,'a signed','an 
unsigned')} ${current.build.config} build for the 
${current.build.framework.name} framework" />
             <mkdir dir="${build.bin.dir}" />
@@ -204,8 +205,9 @@
         <property name="current.build.framework.sign" value="true" />
         <property name="link.sdkdoc.version" value="SDK_v2_0" />
         <property name="link.sdkdoc.web" value="true" />
-        <if test="${framework::exists(current.build.framework)}">
-            <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+        <!-- Use the .NET 3.5 compiler for improved language features.  Still 
targets same runtime. -->
+        <if test="${framework::exists('net-3.5')}">
+            <property name="nant.settings.currentframework" value="net-3.5" />
         </if>
     </target>
 
@@ -221,6 +223,16 @@
         </if>
     </target>
 
+    <target name="set-net-4.0-framework-configuration">
+        <property name="current.build.framework" value="net-4.0" />
+        <property name="current.build.framework.name" value=".NET 4.0" />
+        <property name="current.build.defines" 
value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" dynamic="true" />
+        <property name="current.build.framework.sign" value="true" />
+        <property name="link.sdkdoc.version" value="SDK_v6_1" />
+        <property name="link.sdkdoc.web" value="true" />
+        <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+    </target>
+
     <target name="set-netcf-2.0-framework-configuration">
         <property name="current.build.framework" value="netcf-2.0" />
         <property name="current.build.framework.name" value=".NET Compact 
Framework 2.0" />

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml Sat Aug 21 
00:55:01 2010
@@ -44,6 +44,7 @@
     <property name="current.build.config"    value="${if(project.release.type 
== 'release', 'release', 'debug')}" overwrite="false" />
     <property name="current.build.framework" 
value="${framework::get-target-framework()}" overwrite="false" />
     <property name="current.build.defines"   value="${build.defines}" />
+    <!-- TODO: Add net-4.0 once NAnt supports it. -->
     <property name="build.framework.strings" 
value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" 
unless="${property::exists('build.framework.strings')}"/>
     <property name="current.build.framework.assembly.dir" 
value="${framework::get-assembly-directory(framework::get-target-framework())}" 
dynamic="true" />
 
@@ -115,7 +116,7 @@
         </if>
 
         <property name="current.build.keysign" 
value="${current.build.framework.sign}" />
-        <property name="build.bin.dir" 
value="${build.dir}/${nant.settings.currentframework}/${current.build.config}" 
/>
+        <property name="build.bin.dir" 
value="${build.dir}/${current.build.framework}/${current.build.config}" />
         <if test="${not(build.skip)}">
             <echo message="Doing ${if(current.build.keysign,'a signed','an 
unsigned')} ${current.build.config} build for the 
${current.build.framework.name} framework" />
             <mkdir dir="${build.bin.dir}" />
@@ -204,8 +205,9 @@
         <property name="current.build.framework.sign" value="true" />
         <property name="link.sdkdoc.version" value="SDK_v2_0" />
         <property name="link.sdkdoc.web" value="true" />
-        <if test="${framework::exists(current.build.framework)}">
-            <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+        <!-- Use the .NET 3.5 compiler for improved language features.  Still 
targets same runtime. -->
+        <if test="${framework::exists('net-3.5')}">
+            <property name="nant.settings.currentframework" value="net-3.5" />
         </if>
     </target>
 
@@ -221,6 +223,16 @@
         </if>
     </target>
 
+    <target name="set-net-4.0-framework-configuration">
+        <property name="current.build.framework" value="net-4.0" />
+        <property name="current.build.framework.name" value=".NET 4.0" />
+        <property name="current.build.defines" 
value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" dynamic="true" />
+        <property name="current.build.framework.sign" value="true" />
+        <property name="link.sdkdoc.version" value="SDK_v6_1" />
+        <property name="link.sdkdoc.web" value="true" />
+        <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+    </target>
+
     <target name="set-netcf-2.0-framework-configuration">
         <property name="current.build.framework" value="netcf-2.0" />
         <property name="current.build.framework.name" value=".NET Compact 
Framework 2.0" />

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml?rev=987681&r1=987680&r2=987681&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml Sat Aug 21 
00:55:01 2010
@@ -44,6 +44,7 @@
     <property name="current.build.config"    value="${if(project.release.type 
== 'release', 'release', 'debug')}" overwrite="false" />
     <property name="current.build.framework" 
value="${framework::get-target-framework()}" overwrite="false" />
     <property name="current.build.defines"   value="${build.defines}" />
+    <!-- TODO: Add net-4.0 once NAnt supports it. -->
     <property name="build.framework.strings" 
value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" 
unless="${property::exists('build.framework.strings')}"/>
     <property name="current.build.framework.assembly.dir" 
value="${framework::get-assembly-directory(framework::get-target-framework())}" 
dynamic="true" />
 
@@ -115,7 +116,7 @@
         </if>
 
         <property name="current.build.keysign" 
value="${current.build.framework.sign}" />
-        <property name="build.bin.dir" 
value="${build.dir}/${nant.settings.currentframework}/${current.build.config}" 
/>
+        <property name="build.bin.dir" 
value="${build.dir}/${current.build.framework}/${current.build.config}" />
         <if test="${not(build.skip)}">
             <echo message="Doing ${if(current.build.keysign,'a signed','an 
unsigned')} ${current.build.config} build for the 
${current.build.framework.name} framework" />
             <mkdir dir="${build.bin.dir}" />
@@ -204,8 +205,9 @@
         <property name="current.build.framework.sign" value="true" />
         <property name="link.sdkdoc.version" value="SDK_v2_0" />
         <property name="link.sdkdoc.web" value="true" />
-        <if test="${framework::exists(current.build.framework)}">
-            <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+        <!-- Use the .NET 3.5 compiler for improved language features.  Still 
targets same runtime. -->
+        <if test="${framework::exists('net-3.5')}">
+            <property name="nant.settings.currentframework" value="net-3.5" />
         </if>
     </target>
 
@@ -221,6 +223,16 @@
         </if>
     </target>
 
+    <target name="set-net-4.0-framework-configuration">
+        <property name="current.build.framework" value="net-4.0" />
+        <property name="current.build.framework.name" value=".NET 4.0" />
+        <property name="current.build.defines" 
value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" dynamic="true" />
+        <property name="current.build.framework.sign" value="true" />
+        <property name="link.sdkdoc.version" value="SDK_v6_1" />
+        <property name="link.sdkdoc.web" value="true" />
+        <property name="nant.settings.currentframework" 
value="${current.build.framework}" />
+    </target>
+
     <target name="set-netcf-2.0-framework-configuration">
         <property name="current.build.framework" value="netcf-2.0" />
         <property name="current.build.framework.name" value=".NET Compact 
Framework 2.0" />


Reply via email to