Use the C# 3.5 compiler to target .NET 2.0 runtime to take advantage of the 
latest language features.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/commit/dcdddb81
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/tree/dcdddb81
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/diff/dcdddb81

Branch: refs/heads/1.4.x
Commit: dcdddb813dbcd537e00816b6e7125c0cb7133409
Parents: 3a202f0
Author: Jim Gomes <[email protected]>
Authored: Sat Aug 21 00:55:01 2010 +0000
Committer: Jim Gomes <[email protected]>
Committed: Sat Aug 21 00:55:01 2010 +0000

----------------------------------------------------------------------
 trunk/nant-common.xml | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/blob/dcdddb81/trunk/nant-common.xml
----------------------------------------------------------------------
diff --git a/trunk/nant-common.xml b/trunk/nant-common.xml
index e4d8738..c962d83 100644
--- a/trunk/nant-common.xml
+++ b/trunk/nant-common.xml
@@ -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