Skip to content

Commit 495dc77

Browse files
KevinRansombaronfel
authored andcommitted
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
1 parent 62e5dd8 commit 495dc77

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

src/fsharp/CompileOps.fs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,12 +2589,6 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
25892589
| Some _ -> dllReference
25902590
| None -> AssemblyReference(range0, getDefaultFSharpCoreReference, None)
25912591

2592-
// If either mscorlib.dll/System.Runtime.dll/netstandard.dll or FSharp.Core.dll are explicitly specified then we require the --noframework flag.
2593-
// The reason is that some non-default frameworks may not have the default dlls. For example, Client profile does
2594-
// not have System.Web.dll.
2595-
do if (primaryAssemblyExplicitFilenameOpt.IsSome && data.framework) then
2596-
error(Error(FSComp.SR.buildExplicitCoreLibRequiresNoFramework("--noframework"), rangeStartup))
2597-
25982592
// clrRoot: the location of the primary assembly (mscorlib.dll or netstandard.dll or System.Runtime.dll)
25992593
//
26002594
// targetFrameworkVersionValue: Normally just HighestInstalledNetFrameworkVersion()

src/fsharp/DotNetFrameworkDependencies.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies
182182
// (a) included in the environment used for all .fsx files (see service.fs)
183183
// (b) included in environment for files 'orphaned' from a project context
184184
// -- for orphaned files (files in VS without a project context)
185-
// -- for files given on a command line without --noframework set
186185
let getDesktopDefaultReferences useFsiAuxLib = [
187186
yield "mscorlib"
188187
yield "System"

src/fsharp/FSComp.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,6 @@ lexIndentOffForML,"Consider using a file with extension '.ml' or '.mli' instead"
10861086
1219,tcUnionCaseNameConflictsWithGeneratedType,"The union case named '%s' conflicts with the generated type '%s'"
10871087
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"
10881088
1221,tcDllImportNotAllowed,"DLLImport bindings must be static members in a class or function definitions in a module"
1089-
1222,buildExplicitCoreLibRequiresNoFramework,"When mscorlib.dll is explicitly referenced the %s option must also be passed"
10901089
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."
10911090
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."
10921091
1227,buildUnexpectedFileNameCharacter,"Filename '%s' contains invalid character '%s'"

0 commit comments

Comments
 (0)