You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by bo...@apache.org on 2011/08/20 06:55:18 UTC

svn commit: r1159844 - in /logging/log4net/trunk: ./ src/Appender/ src/Layout/ src/Layout/Pattern/ tests/

Author: bodewig
Date: Sat Aug 20 04:55:17 2011
New Revision: 1159844

URL: http://svn.apache.org/viewvc?rev=1159844&view=rev
Log:
first attempt at building client profile assemblies

Modified:
    logging/log4net/trunk/log4net.build
    logging/log4net/trunk/log4net.include
    logging/log4net/trunk/src/Appender/AspNetTraceAppender.cs
    logging/log4net/trunk/src/Layout/Pattern/AspNetCachePatternConverter.cs
    logging/log4net/trunk/src/Layout/Pattern/AspNetContextPatternConverter.cs
    logging/log4net/trunk/src/Layout/Pattern/AspNetPatternConverter.cs
    logging/log4net/trunk/src/Layout/Pattern/AspNetRequestPatternConverter.cs
    logging/log4net/trunk/src/Layout/Pattern/AspNetSessionPatternConverter.cs
    logging/log4net/trunk/src/Layout/PatternLayout.cs
    logging/log4net/trunk/tests/nant.build

Modified: logging/log4net/trunk/log4net.build
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.build?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/log4net.build (original)
+++ logging/log4net/trunk/log4net.build Sat Aug 20 04:55:17 2011
@@ -303,6 +303,7 @@ limitations under the License.
         <!-- NET_3_5 -->
         <if test="${framework::exists('net-3.5')}">
           <call target="compile-net-3.5" />
+          <call target="compile-net-3.5-cp" />
         </if>
         <if test="${not framework::exists('net-3.5')}">
           <if test="${property::exists('project.build.package') and project.build.package}">
@@ -315,6 +316,7 @@ limitations under the License.
         <!-- NET_4_0 -->
         <if test="${framework::exists('net-4.0')}">
           <call target="compile-net-4.0" />
+          <call target="compile-net-4.0-cp" />
         </if>
         <if test="${not framework::exists('net-4.0')}">
           <if test="${property::exists('project.build.package') and project.build.package}">
@@ -745,6 +747,70 @@ limitations under the License.
       </csc>
     </if>
   </target>
+  <target name="compile-net-3.5-cp" description="Builds .NET Framework 3.5 Client Profile version" depends="set-net-3.5-cp-runtime-configuration, check-log4net-basedir, clean-current-bin-dir">
+    <!-- initialize the temp.build.skip property to false -->
+    <property name="temp.build.skip" value="false" />
+    <if test="${current.build.config.release}">
+      <!-- check if the log4net key file is available -->
+      <if test="${not file::exists(log4net.basedir + '/log4net.snk')}">
+        <if test="${property::exists('project.build.package') and project.build.package}">
+          <fail message="Key file not found." />
+        </if>
+        <if test="${not(property::exists('project.build.package') and project.build.package)}">
+          <echo message="Key file not found. You can generate a key file by running 'sn -k log4net.snk'." />
+          <echo message="The generated key file should be stored in the log4net base directory." />
+          <echo message="The release build will be skipped." />
+          <property name="temp.build.skip" value="true" />
+        </if>
+      </if>
+    </if>
+    <if test="${not temp.build.skip}">
+      <csc if="${current.build.config.release}" keyfile="${path::combine(log4net.basedir, 'log4net.snk')}" nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.dll" doc="${current.bin.dir}/log4net.xml">
+        <nowarn>
+          <!-- warning CS1058: A previous catch clause already catches all exceptions. All non-exceptions thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException -->
+          <warning number="1058" />
+        </nowarn>
+        <sources basedir="${log4net.basedir}/src">
+          <include name="**/*.cs" />
+        </sources>
+        <resources failonempty="true">
+          <include name="${log4net.basedir}/NOTICE" />
+          <include name="${log4net.basedir}/LICENSE" />
+        </resources>
+        <references>
+          <include name="mscorlib.dll" />
+          <include name="System.dll" />
+          <include name="System.Data.dll" />
+          <include name="System.Xml.dll" />
+          <include name="System.Configuration.dll" />
+          <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework family>/<framework version>/<build configuration> directory -->
+          <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" />
+        </references>
+      </csc>      
+      <csc if="${current.build.config.debug}" nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.dll" doc="${current.bin.dir}/log4net.xml">
+        <nowarn>
+          <!-- warning CS1058: A previous catch clause already catches all exceptions. All non-exceptions thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException -->
+          <warning number="1058" />
+        </nowarn>
+        <sources basedir="${log4net.basedir}/src">
+          <include name="**/*.cs" />
+        </sources>
+        <resources failonempty="true">
+          <include name="${log4net.basedir}/NOTICE" />
+          <include name="${log4net.basedir}/LICENSE" />
+        </resources>
+        <references>
+          <include name="mscorlib.dll" />
+          <include name="System.dll" />
+          <include name="System.Data.dll" />
+          <include name="System.Xml.dll" />
+          <include name="System.Configuration.dll" />
+          <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework family>/<framework version>/<build configuration> directory -->
+          <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" />
+        </references>
+      </csc>
+    </if>
+  </target>
   <target name="compile-net-4.0" description="Builds .NET Framework 4.0 version" depends="set-net-4.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir">
     <!-- initialize the temp.build.skip property to false -->
     <property name="temp.build.skip" value="false" />
@@ -811,6 +877,70 @@ limitations under the License.
       </csc>
     </if>
   </target>
+  <target name="compile-net-4.0-cp" description="Builds .NET Framework 4.0 Client Profile version" depends="set-net-4.0-cp-runtime-configuration, check-log4net-basedir, clean-current-bin-dir">
+    <!-- initialize the temp.build.skip property to false -->
+    <property name="temp.build.skip" value="false" />
+    <if test="${current.build.config.release}">
+      <!-- check if the log4net key file is available -->
+      <if test="${not file::exists(log4net.basedir + '/log4net.snk')}">
+        <if test="${property::exists('project.build.package') and project.build.package}">
+          <fail message="Key file not found." />
+        </if>
+        <if test="${not(property::exists('project.build.package') and project.build.package)}">
+          <echo message="Key file not found. You can generate a key file by running 'sn -k log4net.snk'." />
+          <echo message="The generated key file should be stored in the log4net base directory." />
+          <echo message="The release build will be skipped." />
+          <property name="temp.build.skip" value="true" />
+        </if>
+      </if>
+    </if>
+    <if test="${not temp.build.skip}">
+      <csc if="${current.build.config.release}" keyfile="${path::combine(log4net.basedir, 'log4net.snk')}" nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.dll" doc="${current.bin.dir}/log4net.xml">
+        <nowarn>
+          <!-- warning CS1058: A previous catch clause already catches all exceptions. All non-exceptions thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException -->
+          <warning number="1058" />
+        </nowarn>
+        <sources basedir="${log4net.basedir}/src">
+          <include name="**/*.cs" />
+        </sources>
+        <resources failonempty="true">
+          <include name="${log4net.basedir}/NOTICE" />
+          <include name="${log4net.basedir}/LICENSE" />
+        </resources>
+        <references>
+          <include name="mscorlib.dll" />
+          <include name="System.dll" />
+          <include name="System.Data.dll" />
+          <include name="System.Xml.dll" />
+          <include name="System.Configuration.dll" />
+          <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework family>/<framework version>/<build configuration> directory -->
+          <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" />
+        </references>
+      </csc>      
+      <csc if="${current.build.config.debug}" nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.dll" doc="${current.bin.dir}/log4net.xml">
+        <nowarn>
+          <!-- warning CS1058: A previous catch clause already catches all exceptions. All non-exceptions thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException -->
+          <warning number="1058" />
+        </nowarn>
+        <sources basedir="${log4net.basedir}/src">
+          <include name="**/*.cs" />
+        </sources>
+        <resources failonempty="true">
+          <include name="${log4net.basedir}/NOTICE" />
+          <include name="${log4net.basedir}/LICENSE" />
+        </resources>
+        <references>
+          <include name="mscorlib.dll" />
+          <include name="System.dll" />
+          <include name="System.Data.dll" />
+          <include name="System.Xml.dll" />
+          <include name="System.Configuration.dll" />
+          <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework family>/<framework version>/<build configuration> directory -->
+          <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" />
+        </references>
+      </csc>
+    </if>
+  </target>
     <target name="compile-mono-1.0" description="Builds Mono 1.0 version" depends="set-mono-1.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir">
         <!-- initialize the temp.build.skip property to false -->
         <property name="temp.build.skip" value="false" />

Modified: logging/log4net/trunk/log4net.include
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.include?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/log4net.include (original)
+++ logging/log4net/trunk/log4net.include Sat Aug 20 04:55:17 2011
@@ -252,6 +252,19 @@ limitations under the License.
       <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}" />      
       <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
     </target>
+    <!-- uses NET_2_0 defines plus CLIENT_PROFILE-->
+    <target name="set-net-3.5-cp-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
+      <property name="nant.settings.currentframework" value="net-3.5" />
+      <property name="current.build.debug" value="${build.debug}" dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True,CLIENT_PROFILE=True" dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0 /D CLIENT_PROFILE" dynamic="true" />
+      <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}" />
+      <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}" />      
+      <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
+    </target>
     <!-- uses NET_2_0 plus NET_4_0 defines -->
     <target name="set-net-4.0-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
       <property name="nant.settings.currentframework" value="net-4.0" />
@@ -265,6 +278,19 @@ limitations under the License.
       <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}" />      
       <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
     </target>
+    <!-- uses NET_2_0 plus NET_4_0 and CLIENT_PROFILE defines -->
+    <target name="set-net-4.0-cp-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
+      <property name="nant.settings.currentframework" value="net-4.0" />
+      <property name="current.build.debug" value="${build.debug}" dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0,NET_4_0,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0,NET_4_0,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True,NET_4_0=True,CLIENT_PROFILE=True" dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0,NET_4_0,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0 /D NET_4_0 /D CLIENT_PROFILE" dynamic="true" />
+      <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}" />
+      <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}" />      
+      <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
+    </target>
     <target name="set-netcf-1.0-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
         <property name="nant.settings.currentframework" value="netcf-1.0" />
         <property name="current.build.debug" value="${build.debug}" dynamic="true" />

Modified: logging/log4net/trunk/src/Appender/AspNetTraceAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/AspNetTraceAppender.cs?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/AspNetTraceAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/AspNetTraceAppender.cs Sat Aug 20 04:55:17 2011
@@ -19,7 +19,7 @@
 
 // .NET Compact Framework 1.0 has no support for ASP.NET
 // SSCLI 1.0 has no support for ASP.NET
-#if !NETCF && !SSCLI
+#if !NETCF && !SSCLI && !CLIENT_PROFILE
 
 using System.Web;
 

Modified: logging/log4net/trunk/src/Layout/Pattern/AspNetCachePatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Layout/Pattern/AspNetCachePatternConverter.cs?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/src/Layout/Pattern/AspNetCachePatternConverter.cs (original)
+++ logging/log4net/trunk/src/Layout/Pattern/AspNetCachePatternConverter.cs Sat Aug 20 04:55:17 2011
@@ -19,7 +19,7 @@
 
 // .NET Compact Framework 1.0 has no support for ASP.NET
 // SSCLI 1.0 has no support for ASP.NET
-#if !NETCF && !SSCLI 
+#if !NETCF && !SSCLI && !CLIENT_PROFILE
 
 using System.IO;
 using System.Web;

Modified: logging/log4net/trunk/src/Layout/Pattern/AspNetContextPatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Layout/Pattern/AspNetContextPatternConverter.cs?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/src/Layout/Pattern/AspNetContextPatternConverter.cs (original)
+++ logging/log4net/trunk/src/Layout/Pattern/AspNetContextPatternConverter.cs Sat Aug 20 04:55:17 2011
@@ -19,7 +19,7 @@
 
 // .NET Compact Framework 1.0 has no support for ASP.NET
 // SSCLI 1.0 has no support for ASP.NET
-#if !NETCF && !SSCLI 
+#if !NETCF && !SSCLI && !CLIENT_PROFILE
 
 using System.IO;
 using System.Web;

Modified: logging/log4net/trunk/src/Layout/Pattern/AspNetPatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Layout/Pattern/AspNetPatternConverter.cs?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/src/Layout/Pattern/AspNetPatternConverter.cs (original)
+++ logging/log4net/trunk/src/Layout/Pattern/AspNetPatternConverter.cs Sat Aug 20 04:55:17 2011
@@ -19,7 +19,7 @@
 
 // .NET Compact Framework 1.0 has no support for ASP.NET
 // SSCLI 1.0 has no support for ASP.NET
-#if !NETCF && !SSCLI 
+#if !NETCF && !SSCLI && !CLIENT_PROFILE
 
 using System.IO;
 using System.Web;

Modified: logging/log4net/trunk/src/Layout/Pattern/AspNetRequestPatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Layout/Pattern/AspNetRequestPatternConverter.cs?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/src/Layout/Pattern/AspNetRequestPatternConverter.cs (original)
+++ logging/log4net/trunk/src/Layout/Pattern/AspNetRequestPatternConverter.cs Sat Aug 20 04:55:17 2011
@@ -19,7 +19,7 @@
 
 // .NET Compact Framework 1.0 has no support for ASP.NET
 // SSCLI 1.0 has no support for ASP.NET
-#if !NETCF && !SSCLI 
+#if !NETCF && !SSCLI && !CLIENT_PROFILE
 
 using System.IO;
 using System.Web;

Modified: logging/log4net/trunk/src/Layout/Pattern/AspNetSessionPatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Layout/Pattern/AspNetSessionPatternConverter.cs?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/src/Layout/Pattern/AspNetSessionPatternConverter.cs (original)
+++ logging/log4net/trunk/src/Layout/Pattern/AspNetSessionPatternConverter.cs Sat Aug 20 04:55:17 2011
@@ -19,7 +19,7 @@
 
 // .NET Compact Framework 1.0 has no support for ASP.NET
 // SSCLI 1.0 has no support for ASP.NET
-#if !NETCF && !SSCLI 
+#if !NETCF && !SSCLI && !CLIENT_PROFILE
 
 using System.IO;
 using System.Web;

Modified: logging/log4net/trunk/src/Layout/PatternLayout.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Layout/PatternLayout.cs?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/src/Layout/PatternLayout.cs (original)
+++ logging/log4net/trunk/src/Layout/PatternLayout.cs Sat Aug 20 04:55:17 2011
@@ -816,7 +816,7 @@ namespace log4net.Layout
 
 // .NET Compact Framework 1.0 has no support for ASP.NET
 // SSCLI 1.0 has no support for ASP.NET
-#if !NETCF && !SSCLI 
+#if !NETCF && !SSCLI && !CLIENT_PROFILE
 			s_globalRulesRegistry.Add("aspnet-cache", typeof(AspNetCachePatternConverter));
 			s_globalRulesRegistry.Add("aspnet-context", typeof(AspNetContextPatternConverter));
 			s_globalRulesRegistry.Add("aspnet-request", typeof(AspNetRequestPatternConverter));

Modified: logging/log4net/trunk/tests/nant.build
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/nant.build?rev=1159844&r1=1159843&r2=1159844&view=diff
==============================================================================
--- logging/log4net/trunk/tests/nant.build (original)
+++ logging/log4net/trunk/tests/nant.build Sat Aug 20 04:55:17 2011
@@ -79,6 +79,7 @@ limitations under the License.
 
         <if test="${framework::exists('net-3.5')}">
             <call target="compile-net-3.5" />
+            <call target="compile-net-3.5-cp" />
         </if>
         <if test="${not framework::exists('net-3.5')}">
             <if test="${property::exists('project.build.package') and project.build.package}">
@@ -91,6 +92,7 @@ limitations under the License.
 
         <if test="${framework::exists('net-4.0')}">
             <call target="compile-net-4.0" />
+            <call target="compile-net-4.0-cp" />
         </if>
         <if test="${not framework::exists('net-4.0')}">
             <if test="${property::exists('project.build.package') and project.build.package}">
@@ -380,6 +382,60 @@ limitations under the License.
         </csc>
     </target>
 
+    <target name="compile-net-3.5-cp" description="Builds log4net tests .NET Framework 3.5 Client Profile version" depends="set-net-3.5-cp-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly">
+        <!-- copy log4net build output -->
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/${current.bin.dir}">
+                <include name="*.*" />
+            </fileset>
+        </copy>
+        <!-- copy referenced libraries to build output -->
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/tests/lib">
+                <include name="/*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
+            <sources basedir="${log4net.basedir}/tests/src">
+                <include name="**/*.cs" />
+                <include name="../../src/AssemblyVersionInfo.cs" />
+            </sources>
+            <references defaultexcludes="true">
+                <include name="mscorlib.dll" />
+                <include name="System.dll" />
+                <include name="System.Data.dll" />
+                <include name="System.Xml.dll" />
+                <include name="System.Runtime.Remoting.dll" />
+                <include name="${current.bin.dir}/log4net.dll" frompath="false" />
+                <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
+                <include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
+                <include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
+                <include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
+                <include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
+            </references>
+        </csc>
+    </target>
+
     <target name="compile-net-4.0" description="Builds log4net tests .NET Framework 4.0 version" depends="set-net-4.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly">
         <!-- copy log4net build output -->
         <copy todir="${current.bin.dir}">
@@ -435,6 +491,60 @@ limitations under the License.
         </csc>
     </target>
 
+    <target name="compile-net-4.0-cp" description="Builds log4net tests .NET Framework 4.0 Client Profile version" depends="set-net-4.0-cp-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly">
+        <!-- copy log4net build output -->
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/${current.bin.dir}">
+                <include name="*.*" />
+            </fileset>
+        </copy>
+        <!-- copy referenced libraries to build output -->
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/tests/lib">
+                <include name="/*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <copy todir="${current.bin.dir}">
+            <fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
+                <include name="*.dll" />
+            </fileset>
+        </copy>
+        <csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
+            <sources basedir="${log4net.basedir}/tests/src">
+                <include name="**/*.cs" />
+                <include name="../../src/AssemblyVersionInfo.cs" />
+            </sources>
+            <references defaultexcludes="true">
+                <include name="mscorlib.dll" />
+                <include name="System.dll" />
+                <include name="System.Data.dll" />
+                <include name="System.Xml.dll" />
+                <include name="System.Runtime.Remoting.dll" />
+                <include name="${current.bin.dir}/log4net.dll" frompath="false" />
+                <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
+                <include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
+                <include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
+                <include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
+                <include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
+            </references>
+        </csc>
+    </target>
+
     <!-- Currently we cannot run the tests in the environment of the target framework only in the host framework -->
 
     <target name="runtests" description="Runs log4net tests">
@@ -497,6 +607,13 @@ limitations under the License.
         </nunit2>
     </target>
 
+    <target name="runtests-net-3.5-cp" description="Runs log4net tests on .NET Framework 3.5 Client Profile version" depends="compile-net-3.5-cp">
+        <nunit2>
+            <formatter type="Plain" />
+            <test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
+        </nunit2>
+    </target>
+
     <target name="runtests-net-4.0" description="Runs log4net tests on .NET Framework 4.0 version" depends="compile-net-4.0">
         <nunit2>
             <formatter type="Plain" />
@@ -504,4 +621,11 @@ limitations under the License.
         </nunit2>
     </target>
 
+    <target name="runtests-net-4.0-cp" description="Runs log4net tests on .NET Framework 4.0 Client Profile version" depends="compile-net-4.0-cp">
+        <nunit2>
+            <formatter type="Plain" />
+            <test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
+        </nunit2>
+    </target>
+
 </project>