Skip to content

Commit a21c12f

Browse files
T-GroCopilot
andauthored
Add regression test: #12023, FSI can load System.Drawing.Common via nuget (#19497)
Fixes #12023 Verifies that FSI can load System.Drawing.Common via #r "nuget:" without FS0193 assembly loading errors. The original issue was that FSI did not probe the Microsoft.WindowsDesktop.App runtime folder. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 01fe483 commit a21c12f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ module ``External FSI tests`` =
9393
|> runFsi
9494
|> shouldFail
9595

96+
// https://github.com/dotnet/fsharp/issues/12023
97+
[<FSharp.Test.FactSkipOnSignedBuild>]
98+
let ``Issue 12023 - FSI can load System.Drawing.Common via nuget reference``() =
99+
Fsx """
100+
#r "nuget: System.Drawing.Common"
101+
open System.Drawing
102+
printfn "Assembly loaded: %s" (typeof<Color>.Assembly.GetName().Name)
103+
"""
104+
|> runFsi
105+
|> shouldSucceed
106+
96107

97108
[<Fact>]
98109
let ``Internals visible over a large number of submissions``() =

0 commit comments

Comments
 (0)