From d44950e2b68fb403ed683372a0f81b1214141577 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Tue, 24 Sep 2019 12:20:18 -0700 Subject: [PATCH] Relax --noframework for mscorlib, netstandard and system.runtime (#7612) * Eliminate Relax requirement to apply --noframework when referencing mscorlib/system.runtime.dll/netstandard.dll * Relax requirement to pass --noframework with System.Runtime, netstandard and mscorlib.dll --- src/fsharp/CompileOps.fs | 6 ------ src/fsharp/DotNetFrameworkDependencies.fs | 1 - src/fsharp/FSComp.txt | 1 - src/fsharp/xlf/FSComp.txt.cs.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.de.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.es.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.fr.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.it.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.ja.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.ko.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.pl.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.pt-BR.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.ru.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.tr.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.zh-Hans.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.zh-Hant.xlf | 5 ----- 16 files changed, 73 deletions(-) diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index e2cbf4474f6..239015820aa 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2589,12 +2589,6 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = | Some _ -> dllReference | None -> AssemblyReference(range0, getDefaultFSharpCoreReference, None) - // If either mscorlib.dll/System.Runtime.dll/netstandard.dll or FSharp.Core.dll are explicitly specified then we require the --noframework flag. - // The reason is that some non-default frameworks may not have the default dlls. For example, Client profile does - // not have System.Web.dll. - do if (primaryAssemblyExplicitFilenameOpt.IsSome && data.framework) then - error(Error(FSComp.SR.buildExplicitCoreLibRequiresNoFramework("--noframework"), rangeStartup)) - // clrRoot: the location of the primary assembly (mscorlib.dll or netstandard.dll or System.Runtime.dll) // // targetFrameworkVersionValue: Normally just HighestInstalledNetFrameworkVersion() diff --git a/src/fsharp/DotNetFrameworkDependencies.fs b/src/fsharp/DotNetFrameworkDependencies.fs index 3d8e33082c3..2e96dcd3674 100644 --- a/src/fsharp/DotNetFrameworkDependencies.fs +++ b/src/fsharp/DotNetFrameworkDependencies.fs @@ -182,7 +182,6 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies // (a) included in the environment used for all .fsx files (see service.fs) // (b) included in environment for files 'orphaned' from a project context // -- for orphaned files (files in VS without a project context) - // -- for files given on a command line without --noframework set let getDesktopDefaultReferences useFsiAuxLib = [ yield "mscorlib" yield "System" diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index 703a8cd3a1e..c1ab22ab6ab 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -1086,7 +1086,6 @@ lexIndentOffForML,"Consider using a file with extension '.ml' or '.mli' instead" 1219,tcUnionCaseNameConflictsWithGeneratedType,"The union case named '%s' conflicts with the generated type '%s'" 1220,chkNoReflectedDefinitionOnStructMember,"ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter" 1221,tcDllImportNotAllowed,"DLLImport bindings must be static members in a class or function definitions in a module" -1222,buildExplicitCoreLibRequiresNoFramework,"When mscorlib.dll is explicitly referenced the %s option must also be passed" 1223,buildExpectedSigdataFile,"FSharp.Core.sigdata not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required." 1225,buildExpectedFileAlongSideFSharpCore,"File '%s' not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required." 1227,buildUnexpectedFileNameCharacter,"Filename '%s' contains invalid character '%s'" diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index 10fa84ce31a..04d79253ac6 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -5322,11 +5322,6 @@ Vazby DLLImport musí být statickými členy v definici třídy nebo funkce v modulu. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Pokud se na knihovnu mscorlib.dll nebo FSharp.Core.dll odkazuje explicitně, musí se předávat taky možnost {0}. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. V FSharp.Core se nenašel soubor FSharp.Core.sigdata. Soubor se očekával v {0}. Zvažte upgrade na novější verzi FSharp.Core, kde se tento soubor už nevyžaduje. diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index 2a97ef5d770..da3dfb3f7dc 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -5322,11 +5322,6 @@ Bei DLLImport-Bindungen muss es sich um statische Member von Klassen- oder Funktionsdefinitionen eines Moduls handeln. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Wenn explizit auf "mscorlib.dll" oder "FSharp.Core.dll" verwiesen wird, muss auch die Option "{0}" übergeben werden. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata wurde nicht neben "FSharp.Core" gefunden. Die Datei wurde in {0} erwartet. Erwägen Sie ein Upgrade auf eine aktuellere Version von "FSharp.Core", in der die Datei nicht mehr erforderlich ist. diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 0a1069b1ad1..54d70ff1ef3 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -5322,11 +5322,6 @@ Los enlaces DLLImport deben ser miembros estáticos en definiciones de función o clase dentro de un módulo. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Cuando se hace referencia de forma explícita a mscorlib.dll o FSharp.Core.dll, debe pasarse también la opción {0}. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. No se encontró FSharp.Core.sigdata junto con FSharp.Core. Archivo esperado en {0}. Considere la posibilidad de actualizar a una versión más reciente de FSharp.Core en la que ya no se requiere el archivo. diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index f19c1db7fde..0c952199089 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -5322,11 +5322,6 @@ Les liaisons DLLImport doivent être des membres statiques dans une classe ou des définitions de fonction dans un module - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Lorsque mscorlib.dll ou FSharp.Core.dll est explicitement référencé, l'option {0} doit également être passée - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata introuvable avec FSharp.Core. Fichier attendu dans {0}. Effectuez une mise à niveau vers une version plus récente de FSharp.Core, où ce fichier n'est plus nécessaire. diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index ec424688dcd..9c5dc0937a9 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -5322,11 +5322,6 @@ I binding DLLImport devono essere membri statici in una classe o definizioni di funzione in un modulo - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Quando si fa riferimento in modo esplicito a mscorlib.dll o FSharp.Core.dll è necessario passare anche l'opzione {0} - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. Il file FSharp.Core.sigdata non è stato trovato con FSharp.Core. Il file deve trovarsi in {0}. Provare a eseguire l'aggiornamento a una versione più recente di FSharp.Core, in cui questo file non è più obbligatorio. diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index 6b78b55eccd..c79daf99e15 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -5322,11 +5322,6 @@ DLLImport 束縛はモジュール内のクラスまたは関数定義の静的メンバーであることが必要です - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - mscorlib.dll または FSharp.Core.dll が明示的に参照される場合は、{0} オプションも渡す必要があります - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core と同じ場所に FSharp.Core.sigdata が見つかりません。ファイルは {0} にある必要があります。このファイルを必要としない、より新しいバージョンの FSharp.Core にアップグレードすることをご検討ください。 diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index c6643da5ec5..9b509f10fde 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -5322,11 +5322,6 @@ DLLImport 바인딩은 모듈의 클래스 또는 함수 정의에서 정적 멤버여야 합니다. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - mscorlib.dll 또는 FSharp.Core.dll이 명시적으로 참조될 경우 {0} 옵션도 전달해야 합니다. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core에서 FSharp.Core.sigdata를 찾을 수 없습니다. 파일이 {0}에 있어야 합니다. 이 파일이 더 이상 필요하지 않은 최신 버전의 FSharp.Core로의 업그레이드를 고려해 보세요. diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 8dcbcc291ba..56c58894e28 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -5322,11 +5322,6 @@ Powiązania DLLImport muszą być statycznymi elementami członkowskimi w definicjach klas lub funkcji w module - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - W przypadku jawnego odwołania do pliku mscorlib.dll lub pliku FSharp.Core.dll musi również zostać przekazana opcja {0} - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. Nie znaleziono zasobu FSharp.Core.sigdata z plikiem FSharp.Core. Plik oczekiwany w {0}. Rozważ uaktualnienie do nowszej wersji pliku FSharp.Core, w której ten plik nie jest już wymagany. diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index 717ad3dd6d3..7ff47eff443 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -5322,11 +5322,6 @@ As associações DLLImport devem ser membros estáticos em uma classe ou definições de função em um módulo - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Enquanto mscorlib.dll ou FSharp.Core.dll é explicitamente referenciado, a opção {0} também deve ser passada - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata não encontrado junto com FSharp.Core. Arquivo esperado em {0}. Considere atualizar para uma versão mais recente do FSharp.Corem, na qual esse arquivo não é mais necessário. diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index e1aa38d3560..fa2acf5942f 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -5322,11 +5322,6 @@ Привязки DLLImport должны быть статическими элементами в определениях класса или функции в модуле - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - При явной ссылке на mscorlib.dll или FSharp.Core.dll также должен передаваться параметр {0} - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. Ресурс FSharp.Core.sigdata не найден вместе с FSharp.Core. Файл ожидался в {0}. Рекомендуется обновление до более новой версии FSharp.Core, где этот файл не требуется. diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index ec02c915490..f701970ff2c 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -5322,11 +5322,6 @@ DLLImport bağlamaları bir sınıf içinde statik üyeler veya bir modül içinde işlev tanımları olmalıdır - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - mscorlib.dll veya FSharp.Core.dll dosyalarına açık olarak başvurulduğunda {0} seçeneği de geçirilmelidir - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata, FSharp.Core ile birlikte bulunamadı. Dosyanın {0} içinde olması bekleniyordu. Bu dosyayı gerektirmeyen daha yeni bir FSharp.Core sürümüne yükseltmeniz önerilir. diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index 99448a0a6a0..184b48a9689 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -5322,11 +5322,6 @@ DLLImport 绑定必须是类中的静态成员或模块中的函数定义 - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - 当显式引用 mscorlib.dll 或 FSharp.Core.dll 时,同时也必须传递 {0} 选项 - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. 未能在 FSharp.Core 旁找到 FSharp.Core.sigdata。文件应在 {0} 中。请考虑升级到更新版本的 FSharp.Core,该版本不再需要此文件。 diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index 0eabef76078..5f379b01d5b 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -5322,11 +5322,6 @@ DLLImport 繫結必須是類別中的靜態成員或模組中的函式定義 - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - 如果明確參考了 mscorlib.dll 或 FSharp.Core.dll,就必須同時傳遞 {0} 選項 - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. 找不到與 FSharp.Core 並存的 FSharp.Core.sigdata。檔案應位於 {0}。請考慮升級至最新版的 FSharp.Core,其中不再需要此檔案。