diff --git a/src/libraries/Microsoft.Extensions.Options/src/OptionsFactory.cs b/src/libraries/Microsoft.Extensions.Options/src/OptionsFactory.cs
index f2dcad253fc1c622bb04653440461ecbfc7b7174..f14e2b1e28b1c85dccb97290c38bf17d976bb483 100644
--- a/src/libraries/Microsoft.Extensions.Options/src/OptionsFactory.cs
+++ b/src/libraries/Microsoft.Extensions.Options/src/OptionsFactory.cs
@@ -25,7 +25,7 @@ public class OptionsFactory<[DynamicallyAccessedMembers(Options.DynamicallyAcces
///
/// The configuration actions to run.
/// The initialization actions to run.
- public OptionsFactory(IEnumerable> setups, IEnumerable> postConfigures) : this(setups, postConfigures, validations: null)
+ public OptionsFactory(IEnumerable> setups, IEnumerable> postConfigures) : this(setups, postConfigures, validations: Array.Empty>())
{ }
///
diff --git a/src/libraries/Microsoft.Extensions.Options/tests/Microsoft.Extensions.Options.Tests/OptionsFactoryTests.cs b/src/libraries/Microsoft.Extensions.Options/tests/Microsoft.Extensions.Options.Tests/OptionsFactoryTests.cs
index 061388035ebc95bbeb41cc9e721d35d09f51b6e8..b89752f4ce0dac219431a73d91758587acca1391 100644
--- a/src/libraries/Microsoft.Extensions.Options/tests/Microsoft.Extensions.Options.Tests/OptionsFactoryTests.cs
+++ b/src/libraries/Microsoft.Extensions.Options/tests/Microsoft.Extensions.Options.Tests/OptionsFactoryTests.cs
@@ -168,6 +168,15 @@ public void CanPostConfigureAllDefaultAndNamedOptions()
Assert.Equal("Default1", factory.Create("1").Message);
}
+ [Fact]
+ public void CanCreateOptionsFactory()
+ {
+ var factory = new OptionsFactory(new IConfigureOptions[0],
+ new IPostConfigureOptions[] { });
+
+ Assert.Equal("", factory.Create("").Message);
+ }
+
public class FakeOptionsSetupA : ConfigureOptions
{
public FakeOptionsSetupA() : base(o => o.Message += "A") { }