Repository navigation
Description
Summary
Any task { let! ... } expression in a file that has open ReactiveUI in scope fails to
compile with an internal compiler error:
Repro.fs(8,9): error FS1110: Internal error or badly formed metadata: not enough type parameters were in scope while importing
The same code compiles cleanly with the F# compiler in .NET SDK 10.0.204
(Microsoft (R) F# Compiler version 15.2.204.0 for F# 10.0) against the exact same
ReactiveUI assemblies, so this is a regression in metadata import between 15.2.204 and
15.2.301, not malformed metadata in ReactiveUI.
Repro
dotnet build Repro.fsproj
with SDK 10.0.301 resolved (no global.json in this repo, so the latest installed SDK wins):
Repro.fs(8,9): error FS1110: Internal error or badly formed metadata: not enough type parameters were in scope while importing
The error points at the let! line. The entire source is:
module Repro
open System.Threading.Tasks
open ReactiveUI
let run (chooser : unit -> Task<int>) =
task {
let! file = chooser ()
return file
}Remove open ReactiveUI (it is otherwise unused here) and the file compiles. The
open matters because let! overload resolution for the task builder considers
extension members brought into scope by the open; the compiler crashes while lazily
importing the metadata of one of ReactiveUI's generic extension methods.
What was checked / ruled out
| Variation | Result on 10.0.301 |
|---|---|
Bound type Task<int>, Task<int option>, Task<ICustomInterface option> (interface from a referenced project) |
all fail |
LangVersion unset (default), latest, preview |
all fail |
Nullable unset, enable, disable |
all fail |
| FSharp.Core implicit (10.1.301) and pinned 10.1.202 | all fail |
| ReactiveUI 20.4.1 and 23.2.28 (latest stable) | all fail |
Same file without open ReactiveUI |
compiles |
| Identical code + identical referenced assemblies on SDK 10.0.204 | compiles |
In the original solution where this was found, dotnet clean, deleting every bin/obj,
dotnet build-server shutdown, and toggling graph-based checking
(--parallelcompilation) were also tried — the error is deterministic, not stale state.
Environment
- Windows 11 Pro (10.0.26200), x64
- Broken: .NET SDK 10.0.301 — F# compiler 15.2.301.0
- Working: .NET SDK 10.0.204 — F# compiler 15.2.204.0
- ReactiveUI 20.4.1 … 23.2.28 (any version tested)
Original context
Found in a ~70-project production F# solution where every ViewModel file
(open ReactiveUI + Elmish + task { let! ... }) failed with 9× FS1110 immediately
after the machine's SDK rolled forward from the 10.0.2xx band to 10.0.301
(global.json had rollForward: latestFeature). All failure positions were
let! x = (expr : Task<'T option>) lines; the minimisation above shows the
option/generics in the bound type are incidental.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Add RED tests for FS1110 in task { let! } with generic IL extension i…
Fix FS1110 in task { let! } when generic IL extension is in scope (#1…
Release notes: FS1110 fix in task { let! } with generic IL extension (#…
Fix FS1110 in task { let! } when generic IL extension is in scope (#1…
jam40jeff commentedon Aug 11, 2026
Is there a workaround until 10.0.4xx is release? This is preventing me from being able to compile an application.