diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageExtensions.cs b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageExtensions.cs
index 21df7a1b23..15d303d4a5 100644
--- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageExtensions.cs
+++ b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageExtensions.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#if DEBUG
+#if DIAGNOSTICS_PAGE_MIDDLEWARE
using System;
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.Diagnostics;
diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageMiddleware.cs b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageMiddleware.cs
index 96de5bd28e..73923587ef 100644
--- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageMiddleware.cs
+++ b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageMiddleware.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#if DEBUG
+#if DIAGNOSTICS_PAGE_MIDDLEWARE
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageOptions.cs b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageOptions.cs
index f52ab77a34..04a9a78c6b 100644
--- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageOptions.cs
+++ b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPageOptions.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#if DEBUG
+#if DIAGNOSTICS_PAGE_MIDDLEWARE
using Microsoft.AspNet.Http;
diff --git a/src/Microsoft.AspNet.Diagnostics/Microsoft.AspNet.Diagnostics.kproj b/src/Microsoft.AspNet.Diagnostics/Microsoft.AspNet.Diagnostics.kproj
index 3f17fbc4f1..2869e3e1a0 100644
--- a/src/Microsoft.AspNet.Diagnostics/Microsoft.AspNet.Diagnostics.kproj
+++ b/src/Microsoft.AspNet.Diagnostics/Microsoft.AspNet.Diagnostics.kproj
@@ -204,6 +204,8 @@
+
+
@@ -255,6 +257,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -282,13 +294,8 @@
-
-
-
-
-
@@ -328,20 +335,39 @@
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -380,6 +406,7 @@
+
@@ -407,6 +434,14 @@
+
+
+
+
+
+
+
+
@@ -442,89 +477,47 @@
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
@@ -550,6 +543,8 @@
+
+
@@ -559,7 +554,6 @@
-
@@ -665,6 +659,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -735,7 +754,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1033,4 +1103,4 @@
-
+
\ No newline at end of file