Skip to content
Permalink
Browse files
Use the C# 3.5 compiler to target .NET 2.0 runtime to take advantage …
…of the latest language features.
  • Loading branch information
Jim Gomes committed Aug 21, 2010
1 parent 78f254f commit 0fa9a38c05c7d5b0f44859bf21d58a7a498dba3e
Showing 1 changed file with 15 additions and 3 deletions.
@@ -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" />

0 comments on commit 0fa9a38

Please sign in to comment.