-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with consuming DLLs built with .NET7 from .NET6 #14313
Comments
Do we have a repro? We should adjust /langversion:6.0 so that it never emits the new staticTyOpt. |
I think When switching library project to langversion=7, the issue goes away on the consuming side. |
@dsyme one thing we can do is to warn that it can be technically unsupported. |
In order to avoid dotnet/fsharp#14313
I've tried locally to reproduce the issue. Simply by building the project on the branch v1.3 {
"sdk": {
"version": "6.0.100",
"rollForward": "latestFeature"
}
} repro.fsx #r "FSharpPlus.dll"
open FSharpPlus;; It seems that even with LangVersion 6 specified I can reproduce the issue. |
This reverts commit 80616e3. The reason being that we ended up encountering F# issue dotnet/fsharp#14313
In order to avoid dotnet/fsharp#14313
Use global.json for .NET 6 build See: dotnet/fsharp#14313
This will result in
Error reading/writing metadata for the F# compiled DLL '%s'. Was the DLL compiled with an earlier version of the F# compiler? (error: 'u_trait_sln').
.This is sort of by design, since we're technically picking some data which is unknown to the old compiler.
The general recommendation is to move to .NET7 SDK on the consumer side, or target .NET7, when langversion 7 is needed to be used.
The text was updated successfully, but these errors were encountered: