diff --git a/before_install.sh b/before_install.sh
index 4dab6a15f4cd48efa4c488f698bfef72f20e241b..e0e4ee1d94390c865ea21c9e34efd492e9c2ab5b 100755
--- a/before_install.sh
+++ b/before_install.sh
@@ -58,7 +58,7 @@ fi)
fi)
#TODO: work out how to avoid the need for this
-chmod u+x packages/FSharp.Compiler.Tools.4.0.1.21/tools/fsi.exe
+chmod u+x packages/FSharp.Compiler.Tools.4.1.4/tools/fsi.exe
chmod u+x packages/FsLexYacc.7.0.4/build/fslex.exe
chmod u+x packages/FsLexYacc.7.0.4/build/fsyacc.exe
diff --git a/build.cmd b/build.cmd
index e0294e74e93ff238d4ecd74509f7cf4050f7831b..28f320fe7b35f5378259429171ab08c35d4173df 100644
--- a/build.cmd
+++ b/build.cmd
@@ -518,7 +518,7 @@ if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" (
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
set NUGET_PACKAGES=%~dp0Packages
-set _fsiexe="packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsi.exe"
+set _fsiexe="packages\FSharp.Compiler.Tools.4.1.4\tools\fsi.exe"
if not exist %_fsiexe% echo Error: Could not find %_fsiexe% && goto :failure
%_ngenexe% install %_fsiexe% /nologo
@@ -558,8 +558,8 @@ if "%BUILD_PROTO%" == "1" (
if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "0" (
- echo %_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsc.exe /nologo
- %_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsc.exe /nologo
+ echo %_ngenexe% install packages\FSharp.Compiler.Tools.4.1.4\tools\fsc.exe /nologo
+ %_ngenexe% install packages\FSharp.Compiler.Tools.4.1.4\tools\fsc.exe /nologo
echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
diff --git a/packages.config b/packages.config
index 9b8a453020402dcc9c7efa69c2c0b3270ea44fd9..10af158689087a188d40912bbad547804f558a82 100644
--- a/packages.config
+++ b/packages.config
@@ -40,7 +40,7 @@
-
+
diff --git a/src/FSharpSource.Settings.targets b/src/FSharpSource.Settings.targets
index 2df6b414c267afb27c758bc37eaa054fa9576557..39ce9a5f37c117f0062b07d4567d5099be5aba39 100644
--- a/src/FSharpSource.Settings.targets
+++ b/src/FSharpSource.Settings.targets
@@ -138,7 +138,7 @@
- $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.4\tools
diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets
index cd3e9fba6a3be56acb971e5bd4044138ad47b7ac..704ff47429b7ed19244ed7fa49b1b35235541460 100644
--- a/src/FSharpSource.targets
+++ b/src/FSharpSource.targets
@@ -376,9 +376,9 @@
$(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin
- $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.4\tools
$(FSharpSourcesRoot)\..\Tools\lkg
- ..\packages\FSharp.Compiler.Tools.4.0.1.21\tools\Microsoft.FSharp.Targets
+ ..\packages\FSharp.Compiler.Tools.4.1.4\tools\Microsoft.FSharp.Targets
$(FSharpSourcesRoot)\..\Tools\dotnetcli
dotnet.exe
@@ -390,8 +390,8 @@
$(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin
- $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools
- ..\packages\FSharp.Compiler.Tools.4.0.1.21\tools\Microsoft.FSharp.Targets
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.4\tools
+ ..\packages\FSharp.Compiler.Tools.4.1.4\tools\Microsoft.FSharp.Targets
@@ -488,40 +488,30 @@
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
diff --git a/src/absil/ilreflect.fs b/src/absil/ilreflect.fs
index 802d50a336d2adc915b62c2c07f39409e5828c08..568fd08f92c8d6ac32e01ae2a9ae0091f3870fed 100644
--- a/src/absil/ilreflect.fs
+++ b/src/absil/ilreflect.fs
@@ -616,14 +616,16 @@ let convFieldInit x =
// it isn't we resort to this technique...
let TypeBuilderInstantiationT =
let ty =
- Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
#if ENABLE_MONO_SUPPORT
- let ty =
- if runningOnMono && (isNull ty) then
- Type.GetType("System.Reflection.MonoGenericClass")
+ if runningOnMono then
+ let ty = Type.GetType("System.Reflection.MonoGenericClass")
+ match ty with
+ | null -> Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
+ | _ -> ty
else
- ty
#endif
+ Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
+
assert (not (isNull ty))
ty
diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.targets
index 9fb2337d3080b77d2eaaf13d2ebd31e951714a46..4a05928e02d39a6320444502b910870a266a1753 100644
--- a/src/fsharp/FSharp.Build/Microsoft.FSharp.targets
+++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.targets
@@ -211,7 +211,7 @@ this file.
-
@@ -305,7 +305,8 @@ this file.
Overwrite="true"/>
-
+
+
diff --git a/src/fsharp/FSharp.Core/Linq.fs b/src/fsharp/FSharp.Core/Linq.fs
index 835ab27c90e439236799a504d6acf75b1657e4a0..6691c9524b30006231066419c7e2138020b6e2fb 100644
--- a/src/fsharp/FSharp.Core/Linq.fs
+++ b/src/fsharp/FSharp.Core/Linq.fs
@@ -850,7 +850,10 @@ module LeafExpressionConverter =
// provides no other way to evaluate the expression.
//
// REVIEW: It is possible it is just better to interpret the expression in many common cases, e.g. property-gets, values etc.
- let EvaluateQuotation (e: Microsoft.FSharp.Quotations.Expr) =
+ let EvaluateQuotation (e: Microsoft.FSharp.Quotations.Expr) : obj =
+#if FX_NO_QUOTATIONS_COMPILE
+ raise (new NotSupportedException())
+#else
match e with
| Value (obj,_) -> obj
| _ ->
@@ -862,6 +865,6 @@ module LeafExpressionConverter =
d.DynamicInvoke [| box () |]
with :? System.Reflection.TargetInvocationException as exn ->
raise exn.InnerException
-
+#endif
diff --git a/src/utils/CompilerLocationUtils.fs b/src/utils/CompilerLocationUtils.fs
index 58df295e4ff4a3120a385df2f93d6f0a6cc46476..c57f379a7951a465ce6baa3bc688e9fbcd1549b4 100644
--- a/src/utils/CompilerLocationUtils.fs
+++ b/src/utils/CompilerLocationUtils.fs
@@ -266,10 +266,13 @@ module internal FSharpEnvironment =
| _ -> regkey.GetValue("Release", 0) :?> int |> (fun s -> s >= 0x50000)) // 0x50000 implies 4.5.0
with _ -> false
+ let runningOnMono = (Type.GetType("Mono.Runtime") <> null)
+
// Check if the framework version 4.5 or above is installed
let IsNetFx45OrAboveInstalled =
IsNetFx45OrAboveInstalledAt @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" ||
- IsNetFx45OrAboveInstalledAt @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
+ IsNetFx45OrAboveInstalledAt @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" ||
+ runningOnMono
// Check if the running framework version is 4.5 or above.
// Use the presence of v4.5.x in the registry to distinguish between 4.0 and 4.5