From a101d859454eac1510e60c00e39586a484e163ff Mon Sep 17 00:00:00 2001 From: Copilot Date: Tue, 9 Jun 2026 08:21:09 +0200 Subject: [PATCH 1/5] Tests: add RED tests for --simpleresolution on coreclr (#8509) These tests assert the post-fix behaviour: on .NET Core, --simpleresolution must be ignored with a single FS3888 warning instead of producing FS0078 file-not-found errors for .NET Framework assemblies. They are expected to fail on main until the fix in CompilerOptions.fs lands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Fsc/simpleresolution/simpleresolution.fs | 74 +++++++++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + 2 files changed, 75 insertions(+) create mode 100644 tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs new file mode 100644 index 00000000000..e4dca76cc7b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace CompilerOptions.Fsc + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Simpleresolution = + + // dotnet/fsharp#8509: on .NET Core, --simpleresolution previously triggered + // a flood of FS0078 "Unable to find the file" errors for .NET Framework + // assemblies (mscorlib, System.dll, System.Windows.Forms, ...). After the + // fix, the option is recognised but ignored on coreclr with a single + // warning (FS3888) and the compilation succeeds. + + let private helloWorld = """ +module M +let main () = printfn "hello" +""" + + [] + let ``--simpleresolution on coreclr warns and compiles successfully``() = + FSharp helloWorld + |> asExe + |> withOptions ["--simpleresolution"] + |> compile + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "simpleresolution" + |> ignore + + [] + let ``--simpleresolution on coreclr does not emit FS0078``() = + FSharp helloWorld + |> asExe + |> withOptions ["--simpleresolution"] + |> compile + |> shouldSucceed + |> withDiagnostics [ Warning 3888, Line 0, Col 1, Line 0, Col 1, "The --simpleresolution option is not supported on .NET Core; ignoring." ] + |> ignore + + [] + let ``--simpleresolution combined with --noframework on coreclr still emits the single FS3888 warning``() = + FSharp helloWorld + |> asExe + |> withOptions ["--simpleresolution"; "--noframework"] + |> compile + |> shouldSucceed + |> withWarningCode 3888 + |> ignore + + [] + let ``--simpleresolution on coreclr with explicit -r still compiles``() = + FSharp helloWorld + |> asExe + |> withOptions ["--simpleresolution"; "-r:System.Net.Http.dll"] + |> compile + |> shouldSucceed + |> withWarningCode 3888 + |> ignore + + // Negative guard: a genuinely-missing user reference must still produce FS0078, + // even with --simpleresolution. This ensures the fix only suppresses the + // framework-resolution failures, not the user-driven ones. + [] + let ``--simpleresolution on coreclr still reports FS0078 for a user-supplied missing -r``() = + FSharp helloWorld + |> asExe + |> withOptions ["--simpleresolution"; "-r:Nonexistent.Definitely.Missing.dll"] + |> compile + |> shouldFail + |> withErrorCode 78 + |> ignore diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 954c02b8aca..8a8ebac6ab1 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -420,6 +420,7 @@ + From 8594cb90885226e88249ca483b0a6e613a0e2b06 Mon Sep 17 00:00:00 2001 From: Copilot Date: Tue, 9 Jun 2026 08:45:38 +0200 Subject: [PATCH 2/5] Fix #8509: warn and ignore --simpleresolution on .NET Core On .NET Core, --simpleresolution caused the resolver to search for .NET Framework assemblies (mscorlib, System.dll, System.Windows.Forms, ...) in non-existent directory layouts, producing a flood of misleading FS0078 errors. Gate the handler on FSharpEnvironment.isRunningOnCoreClr: when running on .NET Core, emit a single FS3888 warning and skip the useSimpleResolution assignment. Desktop fsc is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/Compiler/Driver/CompilerOptions.fs | 6 +++- src/Compiler/FSComp.txt | 1 + src/Compiler/xlf/FSComp.txt.cs.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.de.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.es.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.fr.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.it.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.ja.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.ko.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.pl.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.ru.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.tr.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 35 +++++++++++-------- src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 35 +++++++++++-------- .../Fsc/simpleresolution/simpleresolution.fs | 20 +++++++---- 16 files changed, 280 insertions(+), 202 deletions(-) diff --git a/src/Compiler/Driver/CompilerOptions.fs b/src/Compiler/Driver/CompilerOptions.fs index 98cec17265c..1af53fc5505 100644 --- a/src/Compiler/Driver/CompilerOptions.fs +++ b/src/Compiler/Driver/CompilerOptions.fs @@ -1283,7 +1283,11 @@ let advancedFlagsBoth tcConfigB = CompilerOption( "simpleresolution", tagNone, - OptionUnit(fun () -> tcConfigB.useSimpleResolution <- true), + OptionUnit(fun () -> + if FSharpEnvironment.isRunningOnCoreClr then + warning (Error(FSComp.SR.optsSimpleresolutionNotSupportedOnCoreClr (), rangeCmdArgs)) + else + tcConfigB.useSimpleResolution <- true), None, Some(FSComp.SR.optsSimpleresolution ()) ) diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index f9765bdbd6e..07c12118f82 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -910,6 +910,7 @@ optsStaticlink,"Statically link the given assembly and all referenced DLLs that optsResident,"Use a resident background compilation service to improve compiler startup times." optsPdb,"Name the output debug file" optsSimpleresolution,"Resolve assembly references using directory-based rules rather than MSBuild resolution" +3888,optsSimpleresolutionNotSupportedOnCoreClr,"The --simpleresolution option is not supported on .NET Core; ignoring." optsShortFormOf,"Short form of '%s'" optsClirootDeprecatedMsg,"The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead." optsClirootDescription,"Use to override where the compiler looks for mscorlib.dll and framework components" diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index 10fe84e6ab1..07ceac7d028 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -1092,6 +1092,11 @@ Zahrnout informace o rozhraní F#, výchozí je soubor. Klíčové pro distribuci knihoven. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 17f93260936..43d8736aa11 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -1092,6 +1092,11 @@ Schließen Sie F#-Schnittstelleninformationen ein, der Standardwert ist „file“. Wesentlich für die Verteilung von Bibliotheken. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index ecc7e4a3f27..31191777325 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -1092,6 +1092,11 @@ Incluir información de interfaz de F#, el valor predeterminado es file. Esencial para distribuir bibliotecas. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index 3e0ab156a68..a0e6ce4e1b2 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -1092,6 +1092,11 @@ Incluez les informations de l’interface F#, la valeur par défaut est un fichier. Essentiel pour la distribution des bibliothèques. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 424a8e0310b..3c70b009f69 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -1092,6 +1092,11 @@ Includere le informazioni sull'interfaccia F#. Il valore predefinito è file. Essential per la distribuzione di librerie. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index d588b1908d7..ae7e1a83e72 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -1092,6 +1092,11 @@ F# インターフェイス情報を含めます。既定値は file です。ライブラリの配布に不可欠です。 + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index ec0d939e7b2..1e27f089b80 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -1092,6 +1092,11 @@ F# 인터페이스 정보를 포함합니다. 기본값은 파일입니다. 라이브러리를 배포하는 데 필수적입니다. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index ae93051caa0..c0d967da1c5 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -1092,6 +1092,11 @@ Uwzględnij informacje o interfejsie języka F#. Wartość domyślna to plik. Niezbędne do rozpowszechniania bibliotek. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 0e0c2367513..a47a4cea1cd 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -1092,6 +1092,11 @@ Inclua informações da interface F#, o padrão é file. Essencial para distribuir bibliotecas. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index e25503d865e..b66be196a3e 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -1092,6 +1092,11 @@ Включить сведения об интерфейсе F#, по умолчанию используется файл. Необходимо для распространения библиотек. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index a296c02e44c..76e3dc23e99 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -1092,6 +1092,11 @@ F# arabirim bilgilerini dahil edin; varsayılan değer dosyadır. Kitaplıkları dağıtmak için gereklidir. + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index aa66fa326f6..cbc9b0cd2a5 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -1092,6 +1092,11 @@ 包括 F# 接口信息,默认值为文件。对于分发库必不可少。 + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index d8517bff3ff..c1e305410c2 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -1092,6 +1092,11 @@ 包含 F# 介面資訊,預設值為檔案。發佈程式庫的基本功能。 + + The --simpleresolution option is not supported on .NET Core; ignoring. + The --simpleresolution option is not supported on .NET Core; ignoring. + + Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8972,21 +8977,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs index e4dca76cc7b..4d7981dea24 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs @@ -16,7 +16,8 @@ module Simpleresolution = let private helloWorld = """ module M -let main () = printfn "hello" +[] +let main _ = printfn "hello"; 0 """ [] @@ -24,6 +25,7 @@ let main () = printfn "hello" FSharp helloWorld |> asExe |> withOptions ["--simpleresolution"] + |> ignoreWarnings |> compile |> shouldSucceed |> withWarningCode 3888 @@ -35,6 +37,7 @@ let main () = printfn "hello" FSharp helloWorld |> asExe |> withOptions ["--simpleresolution"] + |> ignoreWarnings |> compile |> shouldSucceed |> withDiagnostics [ Warning 3888, Line 0, Col 1, Line 0, Col 1, "The --simpleresolution option is not supported on .NET Core; ignoring." ] @@ -45,6 +48,7 @@ let main () = printfn "hello" FSharp helloWorld |> asExe |> withOptions ["--simpleresolution"; "--noframework"] + |> ignoreWarnings |> compile |> shouldSucceed |> withWarningCode 3888 @@ -55,20 +59,24 @@ let main () = printfn "hello" FSharp helloWorld |> asExe |> withOptions ["--simpleresolution"; "-r:System.Net.Http.dll"] + |> ignoreWarnings |> compile |> shouldSucceed |> withWarningCode 3888 |> ignore - // Negative guard: a genuinely-missing user reference must still produce FS0078, - // even with --simpleresolution. This ensures the fix only suppresses the - // framework-resolution failures, not the user-driven ones. + // Negative guard: a genuinely-missing user reference must still produce a + // resolution error (FS0084 via the MSBuild resolver path, which is what + // coreclr uses now that --simpleresolution is ignored). This ensures the + // fix only suppresses the framework-resolution failures, not the + // user-driven ones. [] - let ``--simpleresolution on coreclr still reports FS0078 for a user-supplied missing -r``() = + let ``--simpleresolution on coreclr still reports an error for a user-supplied missing -r``() = FSharp helloWorld |> asExe |> withOptions ["--simpleresolution"; "-r:Nonexistent.Definitely.Missing.dll"] + |> ignoreWarnings |> compile |> shouldFail - |> withErrorCode 78 + |> withErrorCode 84 |> ignore From 80adf32af5322e97f645c9fc1adff55b0843baa9 Mon Sep 17 00:00:00 2001 From: Copilot Date: Tue, 9 Jun 2026 10:24:03 +0200 Subject: [PATCH 3/5] Polish #8509: release notes; fix fsproj path casing - Add release-notes entry pointing to #8509 under 11.0.100.md. - Correct the Include path casing for the new simpleresolution test file in FSharp.Compiler.ComponentTests.fsproj (Fsc, not fsc) so the build resolves on case-sensitive filesystems (Linux CI). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/release-notes/.FSharp.Compiler.Service/11.0.100.md | 1 + .../FSharp.Compiler.ComponentTests.fsproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 965957dbc0c..68952a65620 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -75,6 +75,7 @@ ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) * Emit debug points at a stack-empty position ([PR #19877](https://github.com/dotnet/fsharp/pull/19877)) * Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under `--warnon:3390` when a get/set property documents the full parameter set across both accessors. ([Issue #13684](https://github.com/dotnet/fsharp/issues/13684), [PR #19884](https://github.com/dotnet/fsharp/pull/19884)) +* Stop emitting misleading `FS0078` errors when `--simpleresolution` is used with `fsc` on .NET Core. The option is now ignored on .NET Core with a single `FS3888` warning. ([Issue #8509](https://github.com/dotnet/fsharp/issues/8509), [PR #XXXXX](https://github.com/dotnet/fsharp/pull/XXXXX)) ### Added diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 8a8ebac6ab1..f5ab2a3c63c 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -420,7 +420,7 @@ - + From 61636cf21567eb4ddc76c623f8e46d53885d9e3e Mon Sep 17 00:00:00 2001 From: Copilot Date: Tue, 9 Jun 2026 11:51:05 +0200 Subject: [PATCH 4/5] Update release notes with PR #19914 link Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/release-notes/.FSharp.Compiler.Service/11.0.100.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 68952a65620..21d0922a0f7 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -75,7 +75,7 @@ ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) * Emit debug points at a stack-empty position ([PR #19877](https://github.com/dotnet/fsharp/pull/19877)) * Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under `--warnon:3390` when a get/set property documents the full parameter set across both accessors. ([Issue #13684](https://github.com/dotnet/fsharp/issues/13684), [PR #19884](https://github.com/dotnet/fsharp/pull/19884)) -* Stop emitting misleading `FS0078` errors when `--simpleresolution` is used with `fsc` on .NET Core. The option is now ignored on .NET Core with a single `FS3888` warning. ([Issue #8509](https://github.com/dotnet/fsharp/issues/8509), [PR #XXXXX](https://github.com/dotnet/fsharp/pull/XXXXX)) +* Stop emitting misleading `FS0078` errors when `--simpleresolution` is used with `fsc` on .NET Core. The option is now ignored on .NET Core with a single `FS3888` warning. ([Issue #8509](https://github.com/dotnet/fsharp/issues/8509), [PR #19914](https://github.com/dotnet/fsharp/pull/19914)) ### Added From 7d725407a51eb4b8c01a3518068119fcfb260ffb Mon Sep 17 00:00:00 2001 From: Copilot Date: Tue, 9 Jun 2026 13:31:01 +0200 Subject: [PATCH 5/5] Revert #8509 fix attempt: --simpleresolution is required by the .NET SDK The fix on this branch (commits a101d85, 8594cb9, 80adf32, 61636cf) warned and ignored --simpleresolution on .NET Core. Two problems make the change unshippable: 1. Microsoft.FSharp.NetSdk.targets sets true by default, so every `dotnet build` of an F# project passes --simpleresolution. The new warning is escalated to `FSC : error FS3888` by MSBuild's FscTask, which broke 22/22 CI jobs in Azure DevOps build 1455738, including the build of FSharp.Core itself. 2. The new `3888,optsSimpleresolutionNotSupportedOnCoreClr` entry was inserted in the unsorted `optsXxx` section of FSComp.txt; the next numbered entry (1046,...) is smaller than 3888, so `src/Compiler/FSCompCheck.fsx` fails with "Error codes not sorted in FSComp.txt, break(s) happened after [3888]". Reverts the production code, FSComp.txt + xlf additions, the new component tests, the test-project listing change and the release- notes entry. Issue #8509 remains open - any future fix must avoid warning on the SDK-driven coreclr code path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 - src/Compiler/Driver/CompilerOptions.fs | 6 +- src/Compiler/FSComp.txt | 1 - src/Compiler/xlf/FSComp.txt.cs.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.de.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.es.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.fr.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.it.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.ja.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.ko.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.pl.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.ru.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.tr.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 35 ++++---- src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 35 ++++---- .../Fsc/simpleresolution/simpleresolution.fs | 82 ------------------- .../FSharp.Compiler.ComponentTests.fsproj | 1 - 18 files changed, 196 insertions(+), 350 deletions(-) delete mode 100644 tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 21d0922a0f7..965957dbc0c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -75,7 +75,6 @@ ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) * Emit debug points at a stack-empty position ([PR #19877](https://github.com/dotnet/fsharp/pull/19877)) * Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under `--warnon:3390` when a get/set property documents the full parameter set across both accessors. ([Issue #13684](https://github.com/dotnet/fsharp/issues/13684), [PR #19884](https://github.com/dotnet/fsharp/pull/19884)) -* Stop emitting misleading `FS0078` errors when `--simpleresolution` is used with `fsc` on .NET Core. The option is now ignored on .NET Core with a single `FS3888` warning. ([Issue #8509](https://github.com/dotnet/fsharp/issues/8509), [PR #19914](https://github.com/dotnet/fsharp/pull/19914)) ### Added diff --git a/src/Compiler/Driver/CompilerOptions.fs b/src/Compiler/Driver/CompilerOptions.fs index 1af53fc5505..98cec17265c 100644 --- a/src/Compiler/Driver/CompilerOptions.fs +++ b/src/Compiler/Driver/CompilerOptions.fs @@ -1283,11 +1283,7 @@ let advancedFlagsBoth tcConfigB = CompilerOption( "simpleresolution", tagNone, - OptionUnit(fun () -> - if FSharpEnvironment.isRunningOnCoreClr then - warning (Error(FSComp.SR.optsSimpleresolutionNotSupportedOnCoreClr (), rangeCmdArgs)) - else - tcConfigB.useSimpleResolution <- true), + OptionUnit(fun () -> tcConfigB.useSimpleResolution <- true), None, Some(FSComp.SR.optsSimpleresolution ()) ) diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 07c12118f82..f9765bdbd6e 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -910,7 +910,6 @@ optsStaticlink,"Statically link the given assembly and all referenced DLLs that optsResident,"Use a resident background compilation service to improve compiler startup times." optsPdb,"Name the output debug file" optsSimpleresolution,"Resolve assembly references using directory-based rules rather than MSBuild resolution" -3888,optsSimpleresolutionNotSupportedOnCoreClr,"The --simpleresolution option is not supported on .NET Core; ignoring." optsShortFormOf,"Short form of '%s'" optsClirootDeprecatedMsg,"The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead." optsClirootDescription,"Use to override where the compiler looks for mscorlib.dll and framework components" diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index 07ceac7d028..10fe84e6ab1 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -1092,11 +1092,6 @@ Zahrnout informace o rozhraní F#, výchozí je soubor. Klíčové pro distribuci knihoven. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 43d8736aa11..17f93260936 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -1092,11 +1092,6 @@ Schließen Sie F#-Schnittstelleninformationen ein, der Standardwert ist „file“. Wesentlich für die Verteilung von Bibliotheken. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 31191777325..ecc7e4a3f27 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -1092,11 +1092,6 @@ Incluir información de interfaz de F#, el valor predeterminado es file. Esencial para distribuir bibliotecas. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index a0e6ce4e1b2..3e0ab156a68 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -1092,11 +1092,6 @@ Incluez les informations de l’interface F#, la valeur par défaut est un fichier. Essentiel pour la distribution des bibliothèques. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 3c70b009f69..424a8e0310b 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -1092,11 +1092,6 @@ Includere le informazioni sull'interfaccia F#. Il valore predefinito è file. Essential per la distribuzione di librerie. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index ae7e1a83e72..d588b1908d7 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -1092,11 +1092,6 @@ F# インターフェイス情報を含めます。既定値は file です。ライブラリの配布に不可欠です。 - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index 1e27f089b80..ec0d939e7b2 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -1092,11 +1092,6 @@ F# 인터페이스 정보를 포함합니다. 기본값은 파일입니다. 라이브러리를 배포하는 데 필수적입니다. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index c0d967da1c5..ae93051caa0 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -1092,11 +1092,6 @@ Uwzględnij informacje o interfejsie języka F#. Wartość domyślna to plik. Niezbędne do rozpowszechniania bibliotek. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index a47a4cea1cd..0e0c2367513 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -1092,11 +1092,6 @@ Inclua informações da interface F#, o padrão é file. Essencial para distribuir bibliotecas. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index b66be196a3e..e25503d865e 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -1092,11 +1092,6 @@ Включить сведения об интерфейсе F#, по умолчанию используется файл. Необходимо для распространения библиотек. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 76e3dc23e99..a296c02e44c 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -1092,11 +1092,6 @@ F# arabirim bilgilerini dahil edin; varsayılan değer dosyadır. Kitaplıkları dağıtmak için gereklidir. - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index cbc9b0cd2a5..aa66fa326f6 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -1092,11 +1092,6 @@ 包括 F# 接口信息,默认值为文件。对于分发库必不可少。 - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index c1e305410c2..d8517bff3ff 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -1092,11 +1092,6 @@ 包含 F# 介面資訊,預設值為檔案。發佈程式庫的基本功能。 - - The --simpleresolution option is not supported on .NET Core; ignoring. - The --simpleresolution option is not supported on .NET Core; ignoring. - - Override indentation rules implied by the language version ({0} by default) Override indentation rules implied by the language version ({0} by default) @@ -8977,21 +8972,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs deleted file mode 100644 index 4d7981dea24..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/Fsc/simpleresolution/simpleresolution.fs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace CompilerOptions.Fsc - -open Xunit -open FSharp.Test -open FSharp.Test.Compiler - -module Simpleresolution = - - // dotnet/fsharp#8509: on .NET Core, --simpleresolution previously triggered - // a flood of FS0078 "Unable to find the file" errors for .NET Framework - // assemblies (mscorlib, System.dll, System.Windows.Forms, ...). After the - // fix, the option is recognised but ignored on coreclr with a single - // warning (FS3888) and the compilation succeeds. - - let private helloWorld = """ -module M -[] -let main _ = printfn "hello"; 0 -""" - - [] - let ``--simpleresolution on coreclr warns and compiles successfully``() = - FSharp helloWorld - |> asExe - |> withOptions ["--simpleresolution"] - |> ignoreWarnings - |> compile - |> shouldSucceed - |> withWarningCode 3888 - |> withDiagnosticMessageMatches "simpleresolution" - |> ignore - - [] - let ``--simpleresolution on coreclr does not emit FS0078``() = - FSharp helloWorld - |> asExe - |> withOptions ["--simpleresolution"] - |> ignoreWarnings - |> compile - |> shouldSucceed - |> withDiagnostics [ Warning 3888, Line 0, Col 1, Line 0, Col 1, "The --simpleresolution option is not supported on .NET Core; ignoring." ] - |> ignore - - [] - let ``--simpleresolution combined with --noframework on coreclr still emits the single FS3888 warning``() = - FSharp helloWorld - |> asExe - |> withOptions ["--simpleresolution"; "--noframework"] - |> ignoreWarnings - |> compile - |> shouldSucceed - |> withWarningCode 3888 - |> ignore - - [] - let ``--simpleresolution on coreclr with explicit -r still compiles``() = - FSharp helloWorld - |> asExe - |> withOptions ["--simpleresolution"; "-r:System.Net.Http.dll"] - |> ignoreWarnings - |> compile - |> shouldSucceed - |> withWarningCode 3888 - |> ignore - - // Negative guard: a genuinely-missing user reference must still produce a - // resolution error (FS0084 via the MSBuild resolver path, which is what - // coreclr uses now that --simpleresolution is ignored). This ensures the - // fix only suppresses the framework-resolution failures, not the - // user-driven ones. - [] - let ``--simpleresolution on coreclr still reports an error for a user-supplied missing -r``() = - FSharp helloWorld - |> asExe - |> withOptions ["--simpleresolution"; "-r:Nonexistent.Definitely.Missing.dll"] - |> ignoreWarnings - |> compile - |> shouldFail - |> withErrorCode 84 - |> ignore diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index f5ab2a3c63c..954c02b8aca 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -420,7 +420,6 @@ -