introduce a FRAMEWORK_3_5 symbol and use it for the 3.5 and 3.5 client profile builds
diff --git a/log4net.build b/log4net.build
index 66d9989..9aaa562 100644
--- a/log4net.build
+++ b/log4net.build
@@ -421,6 +421,7 @@
       <references>
         <include name="mscorlib.dll" />
         <include name="System.dll" />
+        <include name="System.Core.dll" />
         <include name="System.Data.dll" />
         <include name="System.Web.dll" />
         <include name="System.Xml.dll" />
diff --git a/log4net.include b/log4net.include
index 8b97289..4cce39e 100644
--- a/log4net.include
+++ b/log4net.include
@@ -217,28 +217,28 @@
         <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 -->
+    <!-- uses NET_2_0 defines plus FRAMEWORK_3_5-->
     <target name="set-net-3.5-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" dynamic="true" />
-      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET" dynamic="true" />
-      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True" dynamic="true" />
-      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET" dynamic="true" />
-      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET" dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET,FRAMEWORK_3_5" dynamic="true" />
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,FRAMEWORK_3_5" dynamic="true" />
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,FRAMEWORK_3_5=True" dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,FRAMEWORK_3_5" dynamic="true" />
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D FRAMEWORK_3_5" dynamic="true" />
       <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/${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())}/${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-->
+    <!-- uses NET_2_0 defines plus FRAMEWORK_3_5 and 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,CLIENT_PROFILE" dynamic="true" />
-      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,CLIENT_PROFILE" dynamic="true" />
-      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,CLIENT_PROFILE=True" dynamic="true" />
-      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,CLIENT_PROFILE" dynamic="true" />
-      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET,FRAMEWORK_3_5,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,FRAMEWORK_3_5,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,FRAMEWORK_3_5=True,CLIENT_PROFILE=True" dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,FRAMEWORK_3_5,CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D FRAMEWORK_3_5 /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" />
diff --git a/src/AssemblyInfo.cs b/src/AssemblyInfo.cs
index 9b02d6e..07d4d43 100644
--- a/src/AssemblyInfo.cs
+++ b/src/AssemblyInfo.cs
@@ -55,9 +55,13 @@
 #else
 [assembly: AssemblyTitle("Apache log4net for .NET Framework 4.0")]
 #endif // Client Profile
-#elif CLIENT_PROFILE
+#elif FRAMEWORK_3_5
+#if CLIENT_PROFILE
 [assembly: AssemblyTitle("Apache log4net for .NET Framework 3.5 Client Profile")]
 #else
+[assembly: AssemblyTitle("Apache log4net for .NET Framework 3.5")]
+#endif // Client Profile
+#else
 [assembly: AssemblyTitle("Apache log4net for .NET Framework 2.0")]
 #endif // FW 4.0 
 #elif NETCF
diff --git a/src/Log4netAssemblyInfo.cs b/src/Log4netAssemblyInfo.cs
index 53d9713..22e4ec8 100644
--- a/src/Log4netAssemblyInfo.cs
+++ b/src/Log4netAssemblyInfo.cs
@@ -30,10 +30,10 @@
         /// <summary>Version of the framework targeted</summary>
 #if FRAMEWORK_4_0
         public const decimal TargetFrameworkVersion = 4.0M;
-#elif !CLIENT_PROFILE
-        public const decimal TargetFrameworkVersion = 2.0M;
-#else
+#elif FRAMEWORK_3_5
         public const decimal TargetFrameworkVersion = 3.5M;
+#else
+        public const decimal TargetFrameworkVersion = 2.0M;
 #endif
 
         /// <summary>Type of framework targeted</summary>
diff --git a/src/Util/ILogExtensions.cs b/src/Util/ILogExtensions.cs
index c60e74e..2bf098b 100644
--- a/src/Util/ILogExtensions.cs
+++ b/src/Util/ILogExtensions.cs
@@ -17,7 +17,7 @@
 //
 #endregion
 
-#if NET_3_5 || FRAMEWORK_4_0
+#if FRAMEWORK_3_5 || FRAMEWORK_4_0
 
 using System;