diff --git a/eng/generators.targets b/eng/generators.targets
index 4e7d7b99b4403..5283236729566 100644
--- a/eng/generators.targets
+++ b/eng/generators.targets
@@ -30,10 +30,20 @@
+
+
+
+
-
@@ -60,7 +70,7 @@
true
@@ -73,16 +83,12 @@
$(DefineConstants);DLLIMPORTGENERATOR_INTERNALUNSAFE
-
-
-
-
-
-
-
-
+
+
+
+
$(DefineConstants);DLLIMPORTGENERATOR_ENABLED
diff --git a/src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/DllImportGenerator.csproj b/src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/DllImportGenerator.csproj
index 0648253ef2c94..843c88967ad58 100644
--- a/src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/DllImportGenerator.csproj
+++ b/src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/DllImportGenerator.csproj
@@ -41,7 +41,7 @@
-
+
diff --git a/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.Tests/DllImportGenerator.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.Tests/DllImportGenerator.Tests.csproj
index 351241b66278d..94877b6888cce 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.Tests/DllImportGenerator.Tests.csproj
+++ b/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.Tests/DllImportGenerator.Tests.csproj
@@ -18,8 +18,6 @@
-
-