diff --git a/src/fsharp/DotNetFrameworkDependencies.fs b/src/fsharp/DotNetFrameworkDependencies.fs index 0fcb0e6d9b85..cc3cc0800fb4 100644 --- a/src/fsharp/DotNetFrameworkDependencies.fs +++ b/src/fsharp/DotNetFrameworkDependencies.fs @@ -302,6 +302,7 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies yield "System.Data" yield "System.Drawing" yield "System.Core" + yield "System.Configuration" yield getFSharpCoreLibraryName if useFsiAuxLib then yield getFsiLibraryName @@ -378,6 +379,7 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies yield "System.Xml" yield "System.Runtime.Remoting" yield "System.Runtime.Serialization.Formatters.Soap" + yield "System.Configuration" yield "System.Data" yield "System.Deployment" yield "System.Design" diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs index aacbdb2be567..8deed2f994d1 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs @@ -117,6 +117,19 @@ stacktype.Name = "Stack" | Ok(_) -> Assert.False(true, "expected a failure") | Error(ex) -> Assert.IsAssignableFrom(typeof, ex) + + [] + member _.``Script using System.Configuration succeeds``() = + use script = new FSharpScript() + let result, errors = script.Eval(""" +#r "nuget:System.Configuration.ConfigurationManager,5.0.0" +open System.Configuration +System.Configuration.ConfigurationManager.AppSettings.Item "Environment" <- "LOCAL" """) + Assert.Empty(errors) + match result with + | Ok(_) -> () + | Error(ex) -> Assert.True(true, "expected no failures") + [] [] // No argument [] // empty argument