diff --git a/source/CoreLibrary.nfproj b/source/CoreLibrary.nfproj
index 9a7fdbc2..e8c2cc6f 100644
--- a/source/CoreLibrary.nfproj
+++ b/source/CoreLibrary.nfproj
@@ -21,6 +21,7 @@
mscorlib
true
true
+ $(DefineConstants);NANOCLR_APPDOMAINS
v1.0
bin\$(Configuration)\mscorlib.xml
diff --git a/source/System/AppDomain.cs b/source/System/AppDomain.cs
index 9605cbaa..ae7d3044 100644
--- a/source/System/AppDomain.cs
+++ b/source/System/AppDomain.cs
@@ -4,6 +4,12 @@
// See LICENSE file in the project root for full license information.
//
+///////////////////////////////////////////////////
+// DEV NOTE: to enable the AppDomain API add //
+// 'NANOCLR_APPDOMAINS' to the compile constants //
+///////////////////////////////////////////////////
+#if (NANOCLR_APPDOMAINS)
+
using System.Reflection;
using System.Threading;
using System.Runtime.CompilerServices;
@@ -113,3 +119,4 @@ public Assembly Load(String assemblyString)
public static extern void Unload(AppDomain domain);
}
}
+#endif // #if (NANOCLR_APPDOMAINS)
diff --git a/source/System/Threading/Thread.cs b/source/System/Threading/Thread.cs
index 94829953..ff694313 100644
--- a/source/System/Threading/Thread.cs
+++ b/source/System/Threading/Thread.cs
@@ -168,11 +168,16 @@ public extern ThreadState ThreadState
get;
}
+#if (NANOCLR_APPDOMAINS)
+
///
/// Returns the current domain in which the current thread is running.
///
/// An AppDomain representing the current application domain of the running thread.
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern AppDomain GetDomain();
+
+#endif // #if (NANOCLR_APPDOMAINS)
+
}
}