Open pedersorensen opened 1 year ago
It seems that ns2.0 version is loaded (well, and packed together with fsi.dll):
> typeof<TaskBuilder>.Assembly.Location;;
val it: string =
"C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\FSharp\FSharp.Core.dll"
> typeof<TaskBuilder>.Assembly.CustomAttributes;;
val it:
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData>
= seq
[
...
[System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
...
]
cc @KevinRansom
Do we have any reasons for not shipping fsi.dll with the netstandard2.1 Fsharp.Core reference?
task
computation expressions do not supportuse
oruse!
bindings for theIAsyncDisposable
interface when used in F# interactive.Repro steps
Make a type that implements
IAsyncDisposable
and bind it with ause
oruse!
within atask
CE:Expected behavior
The code should compile.
Actual behavior
Error message in both the editor and F# interactive output window
Known workarounds
Use a
let
binding and callDisposeAsync
explicitly, although this is not possible within afinally
block.Related information
Compiles and runs without issue in regular
.fs
files.