diff --git a/src/.editorconfig b/src/.editorconfig
new file mode 100644
index 0000000000..38c5c7eeb5
--- /dev/null
+++ b/src/.editorconfig
@@ -0,0 +1,9 @@
+# Settings that apply only to library code under /src
+# (so tests, samples, benchmarks, and integration-tests are not affected).
+
+[*.cs]
+
+# CA2007: Consider calling ConfigureAwait on the awaited task.
+# Library code must always ConfigureAwait(false) to avoid deadlocks in
+# callers that have a SynchronizationContext.
+dotnet_diagnostic.CA2007.severity = error
diff --git a/src/CodeAnalysis.ruleset b/src/CodeAnalysis.ruleset
deleted file mode 100644
index 3f502775ca..0000000000
--- a/src/CodeAnalysis.ruleset
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index e3e1feb526..6817e477a5 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -32,7 +32,6 @@
false
annotations
- $(MSBuildThisFileDirectory)CodeAnalysis.ruleset