You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
D:\a_work\1\s\src\FSharp.Core\prim-types.fs(7159): Trim analysis warning IL2091: Microsoft.FSharp.Control.LazyExtensions.Create(FSharpFunc`2<Unit,!!0>): 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in 'System.Lazy`1'. The generic parameter 'T' of 'Micros
oft.FSharp.Control.LazyExtensions.Create(FSharpFunc`2<Unit,!!0>)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
The warning appears regardless of -p:ReflectionFree being false or true. The fsproj file has following settings:
Discussed in #17323
Originally posted by @abklearnhere June 18, 2024
F# using lazy keyword raises trimming warnings on publish. For example,
I am creating an F#, .NET 8 (SDK 8.0.302) console app and publish as a single file with AOT, trimming. I run dotnet publish command as below:
This results in warning:
The warning appears regardless of
-p:ReflectionFree
being false or true. Thefsproj
file has following settings:The text was updated successfully, but these errors were encountered: