Issue with consuming DLL when using LangVersion set to 8.0 with .NET SDK 9 #18003
Labels
Bug
Impact-High
(Internal MS Team use only) Describes an issue with extreme impact on existing code.
Regression
Milestone
Recently I changed a large F# code base to work with .NET SDK 9 and F# 9. To start with I didn't change
LangVersion
which gave me a lot of errors of the type:Repro steps
Use .NET SDK 9.
Have a project that has
LangVersion
set to8.0
:Have the following code in
Library.fs
:Have a project that has a project reference to the project above. It doesn't matter what
LangVersion
orTargetFramework
that project has.A zip-file with this example is attached. Running
dotnet build
results in errors.fsharp-error.zip
Expected behavior
It is possible to build the projects without errors.
Actual behavior
I get errors of the following type:
Known workarounds
Set
LangVersion
to9.0
or use .NET SDK 8Related information
A similar problem was discussed in #14313.
This issue is somewhat different I think. Here you get errors even if the same target framework is used for both projects. It is only
LangVersion
that cause the problem.With .NET SDK 8.0.403 it works with
LangVersion
set both to7.0
and8.0
.I have a really large F# code base, and is only the kind of construct that I have in
Library.fs
that causes problems.The text was updated successfully, but these errors were encountered: