diff --git a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
index 1126a60f2b6..1c82ed8fcda 100644
--- a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
+++ b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
@@ -5,7 +5,7 @@
- net45
+ net461true$(DefineConstants);CROSS_PLATFORM_COMPILER$(DefineConstants);ENABLE_MONO_SUPPORT
@@ -28,7 +28,7 @@
-
+ $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll
diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
index c132ae80bb1..648f66924df 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
@@ -2,7 +2,7 @@
- net45
+ net461true
@@ -20,14 +20,14 @@
ProjectCrackerOptions.fs
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
index 45e62e6f25a..bd1c93e7979 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
+++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
@@ -1,7 +1,7 @@
-
-
+
+
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
index 9f690c58ea1..648aacb3c21 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
@@ -6,7 +6,7 @@
Exe
- net45
+ net461true$(DefineConstants);CROSS_PLATFORM_COMPILER$(DefineConstants);ENABLE_MONO_SUPPORT
@@ -23,7 +23,7 @@
-
+ $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dllfalse
diff --git a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
index fc00709da42..30d3c96317f 100644
--- a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
+++ b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
@@ -1,7 +1,7 @@
- net45;netstandard2.0
+ net461;netstandard2.0false$(NoWarn);0067;1591
diff --git a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
index edb85fcf648..85e345669c4 100644
--- a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
+++ b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
@@ -5,7 +5,7 @@
- net46;netcoreapp2.0
+ net461;netcoreapp2.0true$(NoWarn);44;75;true
@@ -78,7 +78,7 @@
-
+
@@ -86,7 +86,7 @@
-
+
diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
index 602050c09a4..166dc7976b7 100644
--- a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
+++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
@@ -6,7 +6,7 @@
- net45;netstandard2.0
+ net461;netstandard2.0true$(DefineConstants);COMPILER_SERVICE_AS_DLL$(DefineConstants);COMPILER
@@ -635,7 +635,7 @@
-
+
@@ -647,7 +647,7 @@
-
+
diff --git a/fcs/README.md b/fcs/README.md
index 8f86342739e..ac97222a3c6 100644
--- a/fcs/README.md
+++ b/fcs/README.md
@@ -12,12 +12,16 @@ Basically we are packaging up the compiler as a DLL and publishing it as a NuGet
There are subtle differences between FSharp.Compiler.Service and FSharp.Compiler.Private (shipped with the Visual F# Tools)
- FCS has a public API
-- FCS is built against **.NET 4.5** and **FSharp.Core 4.0.0.0** to give broader reach
+
+- FCS is built against **.NET 4.6.1** and **FSharp.Core NuGet 4.6.2** to give broader reach
+
- FCS has a NuGet package
-- FCS has a .NET Standard 1.6 version in the nuget package
+
+- FCS has a .NET Standard 2.0 version in the nuget package
+
- FCS testing also tests the "Project Cracker" (see below)
-- FCS doesn't add the System.ValueTuple.dll reference by default, see ``#if COMPILER_SERVICE_AS_DLL`` in compiler codebase
+- FCS doesn't add the System.ValueTuple.dll reference by default, see ``#if COMPILER_SERVICE_AS_DLL`` in compiler codebase
## Version Numbers
diff --git a/fcs/RELEASE_NOTES.md b/fcs/RELEASE_NOTES.md
index 67ac7bcc6b9..d925996ddfe 100644
--- a/fcs/RELEASE_NOTES.md
+++ b/fcs/RELEASE_NOTES.md
@@ -1,3 +1,6 @@
+#### 23.0.1
+ * FSharp.Compiler.Service nuget now uses net461, netstandard2.0 and FSharp.Core 4.6.2
+
#### 22.0.3
* [Add entity.DeclaringEntity](https://github.com/Microsoft/visualfsharp/pull/4633), [FCS feature request](https://github.com/fsharp/FSharp.Compiler.Service/issues/830)
@@ -10,7 +13,7 @@
#### 21.0.1
* Use new .NET SDK project files
- * FSharp.Compiler.Service nuget now uses net45 and netstandard2.0
+ * FSharp.Compiler.Service nuget now uses net461 and netstandard2.0
* FSharp.Compiler.Service netstandard2.0 now supports type providers
#### 19.0.1
diff --git a/fcs/build.fsx b/fcs/build.fsx
index 50735795d88..d1d575c4f76 100644
--- a/fcs/build.fsx
+++ b/fcs/build.fsx
@@ -31,7 +31,7 @@ let dotnetExePath =
if File.Exists(pathToCli) then
pathToCli
else
- DotNetCli.InstallDotNetSDK "2.1.504"
+ DotNetCli.InstallDotNetSDK "2.2.105"
let runDotnet workingDir args =
let result =
diff --git a/fcs/docsrc/content/caches.fsx b/fcs/docsrc/content/caches.fsx
index b2cd9317753..a0a198896cb 100644
--- a/fcs/docsrc/content/caches.fsx
+++ b/fcs/docsrc/content/caches.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Notes on the FSharpChecker caches
=================================================
diff --git a/fcs/docsrc/content/compiler.fsx b/fcs/docsrc/content/compiler.fsx
index a934bc82094..c87f755ed35 100644
--- a/fcs/docsrc/content/compiler.fsx
+++ b/fcs/docsrc/content/compiler.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Hosted Compiler
===============
diff --git a/fcs/docsrc/content/corelib.fsx b/fcs/docsrc/content/corelib.fsx
index 61c249d2ac5..4e175e95eec 100644
--- a/fcs/docsrc/content/corelib.fsx
+++ b/fcs/docsrc/content/corelib.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Notes on FSharp.Core.dll
=================================================
diff --git a/fcs/docsrc/content/editor.fsx b/fcs/docsrc/content/editor.fsx
index 70b6abff459..b8af9d0117b 100644
--- a/fcs/docsrc/content/editor.fsx
+++ b/fcs/docsrc/content/editor.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Editor services
==================================
diff --git a/fcs/docsrc/content/filesystem.fsx b/fcs/docsrc/content/filesystem.fsx
index 6c968803bbe..6c4d973d497 100644
--- a/fcs/docsrc/content/filesystem.fsx
+++ b/fcs/docsrc/content/filesystem.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Virtualized File System
==========================================
diff --git a/fcs/docsrc/content/interactive.fsx b/fcs/docsrc/content/interactive.fsx
index 94a004b36fd..301f77f34e3 100644
--- a/fcs/docsrc/content/interactive.fsx
+++ b/fcs/docsrc/content/interactive.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Interactive Service: Embedding F# Interactive
=============================================
diff --git a/fcs/docsrc/content/ja/compiler.fsx b/fcs/docsrc/content/ja/compiler.fsx
index db49ab825d0..788c715294f 100644
--- a/fcs/docsrc/content/ja/compiler.fsx
+++ b/fcs/docsrc/content/ja/compiler.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラの組み込み
====================
diff --git a/fcs/docsrc/content/ja/corelib.fsx b/fcs/docsrc/content/ja/corelib.fsx
index fc47377cfaa..4dcd09e1154 100644
--- a/fcs/docsrc/content/ja/corelib.fsx
+++ b/fcs/docsrc/content/ja/corelib.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: FSharp.Core.dll についてのメモ
==================================================
diff --git a/fcs/docsrc/content/ja/editor.fsx b/fcs/docsrc/content/ja/editor.fsx
index 439791d3c5e..f8a33e9a75a 100644
--- a/fcs/docsrc/content/ja/editor.fsx
+++ b/fcs/docsrc/content/ja/editor.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: エディタサービス
====================================
diff --git a/fcs/docsrc/content/ja/filesystem.fsx b/fcs/docsrc/content/ja/filesystem.fsx
index 453a145ebaf..6a75cb61961 100644
--- a/fcs/docsrc/content/ja/filesystem.fsx
+++ b/fcs/docsrc/content/ja/filesystem.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: ファイルシステム仮想化
==========================================
diff --git a/fcs/docsrc/content/ja/interactive.fsx b/fcs/docsrc/content/ja/interactive.fsx
index c67b5f27464..59bae44f01b 100644
--- a/fcs/docsrc/content/ja/interactive.fsx
+++ b/fcs/docsrc/content/ja/interactive.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
インタラクティブサービス: F# Interactiveの組み込み
==================================================
diff --git a/fcs/docsrc/content/ja/project.fsx b/fcs/docsrc/content/ja/project.fsx
index 0249107d9c4..8b70e3df5f7 100644
--- a/fcs/docsrc/content/ja/project.fsx
+++ b/fcs/docsrc/content/ja/project.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: プロジェクトの分析
======================================
diff --git a/fcs/docsrc/content/ja/symbols.fsx b/fcs/docsrc/content/ja/symbols.fsx
index c4a5097394e..ff62b0de6b2 100644
--- a/fcs/docsrc/content/ja/symbols.fsx
+++ b/fcs/docsrc/content/ja/symbols.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: シンボルの処理
==================================
diff --git a/fcs/docsrc/content/ja/tokenizer.fsx b/fcs/docsrc/content/ja/tokenizer.fsx
index 405bdef14ad..4daf29b7ead 100644
--- a/fcs/docsrc/content/ja/tokenizer.fsx
+++ b/fcs/docsrc/content/ja/tokenizer.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス:F#トークナイザを使用する
============================================
diff --git a/fcs/docsrc/content/ja/untypedtree.fsx b/fcs/docsrc/content/ja/untypedtree.fsx
index 54c78975025..447e3742fff 100644
--- a/fcs/docsrc/content/ja/untypedtree.fsx
+++ b/fcs/docsrc/content/ja/untypedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス:型無し構文木の処理
======================================
diff --git a/fcs/docsrc/content/project.fsx b/fcs/docsrc/content/project.fsx
index fc9439e6ad7..72bf7993f4b 100644
--- a/fcs/docsrc/content/project.fsx
+++ b/fcs/docsrc/content/project.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Project Analysis
==================================
@@ -324,7 +324,7 @@ into the output folder of your application by the build process. If
you install using Paket or NuGet, then this will be configured for you
automatically. If not, you should reference the provided `.targets`
file manually in your application. This can be found in the NuGet
-package at `build/net45/FSharp.Compiler.Service.ProjectCrackerTool.targets`.
+package at `build/net461/FSharp.Compiler.Service.ProjectCrackerTool.targets`.
The reason for this split was so the analysis of an F# project
file is performed out of process, in order that the necessary assembly
diff --git a/fcs/docsrc/content/queue.fsx b/fcs/docsrc/content/queue.fsx
index 31ac1526d6c..ccc7ccabbff 100644
--- a/fcs/docsrc/content/queue.fsx
+++ b/fcs/docsrc/content/queue.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Notes on the FSharpChecker operations queue
=================================================
diff --git a/fcs/docsrc/content/react.fsx b/fcs/docsrc/content/react.fsx
index 2dfa557238d..ef5ccbf4952 100644
--- a/fcs/docsrc/content/react.fsx
+++ b/fcs/docsrc/content/react.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Reacting to Changes
============================================
@@ -19,7 +19,7 @@ referenced DLLs may change on disk, or referenced files may change.
The ``FSharpChecker`` component from FSharp.Compiler.Service does _not_ actively "listen"
to changes in the file system. However ``FSharpChecker`` _does_ repeatedly ask for
time stamps from the file system which it uses to decide if recomputation is needed.
-FCS doesn�t listen for changes directly - for example, it creates no ``FileWatcher`` object (and the
+FCS doesn't listen for changes directly - for example, it creates no ``FileWatcher`` object (and the
``IFileSystem`` API has no ability to create such objects). This is partly for legacy reasons,
and partly because some hosts forbid the creation of FileWatcher objects.
@@ -33,7 +33,7 @@ stays up-to-date when changes are observed.
If you want to more actively listen for changes, then you should add watchers for the
files specified in the ``DependencyFiles`` property of ``FSharpCheckFileResults`` and ``FSharpCheckProjectResults``.
-Here�s what you need to do:
+Here�s what you need to do:
* When your client notices an CHANGE event on a DependencyFile, it should schedule a refresh call to perform the ParseAndCheckFileInProject (or other operation) again.
This will result in fresh FileSystem calls to compute time stamps.
@@ -42,8 +42,8 @@ Here
for all active projects in which the file occurs. This will result in fresh FileSystem calls to compute time
stamps, and fresh calls to compute whether files exist.
-* Generally clients don�t listen for DELETE events on files. Although it would be logically more consistent
- to do so, in practice it�s very irritating for a "project clean" to invalidate all intellisense and
+* Generally clients don�t listen for DELETE events on files. Although it would be logically more consistent
+ to do so, in practice it�s very irritating for a "project clean" to invalidate all intellisense and
cause lots of red squiggles. Some source control tools also make a change by removing and adding files, which
is best noticed as a single change event.
diff --git a/fcs/docsrc/content/symbols.fsx b/fcs/docsrc/content/symbols.fsx
index 60eb199f990..74701e8b73d 100644
--- a/fcs/docsrc/content/symbols.fsx
+++ b/fcs/docsrc/content/symbols.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Working with symbols
============================================
diff --git a/fcs/docsrc/content/tokenizer.fsx b/fcs/docsrc/content/tokenizer.fsx
index f562c8b0574..7a46a3c91f6 100644
--- a/fcs/docsrc/content/tokenizer.fsx
+++ b/fcs/docsrc/content/tokenizer.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Using the F# tokenizer
=========================================
diff --git a/fcs/docsrc/content/typedtree.fsx b/fcs/docsrc/content/typedtree.fsx
index b5d20b4dab3..43bb55ba730 100644
--- a/fcs/docsrc/content/typedtree.fsx
+++ b/fcs/docsrc/content/typedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Processing typed expression tree
=================================================
diff --git a/fcs/docsrc/content/untypedtree.fsx b/fcs/docsrc/content/untypedtree.fsx
index 4dd89a8d8a9..959e14fb944 100644
--- a/fcs/docsrc/content/untypedtree.fsx
+++ b/fcs/docsrc/content/untypedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Processing untyped syntax tree
=================================================
diff --git a/fcs/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx
index 000f25f6a47..3ef4b0a1bde 100644
--- a/fcs/docsrc/tools/generate.fsx
+++ b/fcs/docsrc/tools/generate.fsx
@@ -32,7 +32,7 @@ open FSharp.MetadataFormat
let root = "."
// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net45"
+let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net461"
let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../../../docs"
let files = __SOURCE_DIRECTORY__ @@ "../files"
diff --git a/fcs/docsrc/tools/generate.ja.fsx b/fcs/docsrc/tools/generate.ja.fsx
index feaeb592d35..bf9f77ce99e 100644
--- a/fcs/docsrc/tools/generate.ja.fsx
+++ b/fcs/docsrc/tools/generate.ja.fsx
@@ -18,9 +18,9 @@ let info =
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------
-#I "../../packages/FSharpVSPowerTools.Core/lib/net45"
+#I "../../packages/FSharpVSPowerTools.Core/lib/net461"
#I "../../packages/FSharp.Formatting/lib/net40"
-#I "../../packages/FSharp.Compiler.Service/lib/net45"
+#I "../../packages/FSharp.Compiler.Service/lib/net461"
#I "../../packages/FAKE/tools"
#r "FSharpVSPowerTools.Core.dll"
#r "System.Web.Razor.dll"
@@ -41,7 +41,7 @@ open FSharp.MetadataFormat
let root = "."
// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net45"
+let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net461"
let content = __SOURCE_DIRECTORY__ @@ "../content/ja"
let outputJa = __SOURCE_DIRECTORY__ @@ "../../../docs/ja"
let files = __SOURCE_DIRECTORY__ @@ "../files"
diff --git a/fcs/paket.dependencies b/fcs/paket.dependencies
index ccaead9f031..284a402166f 100644
--- a/fcs/paket.dependencies
+++ b/fcs/paket.dependencies
@@ -1,6 +1,6 @@
-framework: net45, net46
+framework: net461
source https://www.nuget.org/api/v2/
-nuget FAKE
+nuget FAKE 4.64.6
nuget FSharp.Formatting
diff --git a/fcs/paket.lock b/fcs/paket.lock
index 1ead25b452a..908c7de8d1f 100644
--- a/fcs/paket.lock
+++ b/fcs/paket.lock
@@ -1,4 +1,4 @@
-RESTRICTION: || (== net45) (== net46)
+RESTRICTION: == net461
NUGET
remote: https://www.nuget.org/api/v2
FAKE (4.64.6)
diff --git a/fcs/samples/EditorService/EditorService.fsproj b/fcs/samples/EditorService/EditorService.fsproj
index 447906070f0..25795d9299c 100644
--- a/fcs/samples/EditorService/EditorService.fsproj
+++ b/fcs/samples/EditorService/EditorService.fsproj
@@ -2,7 +2,7 @@
- net46;netcoreapp2.0
+ net461;netcoreapp2.0trueExefalse
@@ -12,11 +12,11 @@
-
+
-
+
diff --git a/fcs/samples/FscExe/FscExe.fsproj b/fcs/samples/FscExe/FscExe.fsproj
index b2b146913a1..a160f690d2f 100644
--- a/fcs/samples/FscExe/FscExe.fsproj
+++ b/fcs/samples/FscExe/FscExe.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461trueExefalse
@@ -14,10 +14,10 @@
-
+
-
+
diff --git a/fcs/samples/FsiExe/FsiExe.fsproj b/fcs/samples/FsiExe/FsiExe.fsproj
index aae2ba03182..4ce18ab142c 100644
--- a/fcs/samples/FsiExe/FsiExe.fsproj
+++ b/fcs/samples/FsiExe/FsiExe.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461trueExefalse
@@ -16,10 +16,10 @@
-
+
-
+
diff --git a/fcs/samples/InteractiveService/InteractiveService.fsproj b/fcs/samples/InteractiveService/InteractiveService.fsproj
index 387439fcfdd..75686578f21 100644
--- a/fcs/samples/InteractiveService/InteractiveService.fsproj
+++ b/fcs/samples/InteractiveService/InteractiveService.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461trueExefalse
@@ -12,10 +12,10 @@
-
+
-
+
diff --git a/fcs/samples/Tokenizer/Tokenizer.fsproj b/fcs/samples/Tokenizer/Tokenizer.fsproj
index 387439fcfdd..75686578f21 100644
--- a/fcs/samples/Tokenizer/Tokenizer.fsproj
+++ b/fcs/samples/Tokenizer/Tokenizer.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461trueExefalse
@@ -12,10 +12,10 @@
-
+
-
+
diff --git a/fcs/samples/UntypedTree/UntypedTree.fsproj b/fcs/samples/UntypedTree/UntypedTree.fsproj
index 387439fcfdd..75686578f21 100644
--- a/fcs/samples/UntypedTree/UntypedTree.fsproj
+++ b/fcs/samples/UntypedTree/UntypedTree.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461trueExefalse
@@ -12,10 +12,10 @@
-
+
-
+
diff --git a/src/absil/illib.fs b/src/absil/illib.fs
index da0b39dfb1c..b05bcab5640 100644
--- a/src/absil/illib.fs
+++ b/src/absil/illib.fs
@@ -488,20 +488,12 @@ module ResizeArray =
/// in order to prevent long-term storage of those values
chunkBySize maxArrayItemCount f inp
-
-/// Because FSharp.Compiler.Service is a library that will target FSharp.Core 4.5.2 for the forseeable future,
-/// we need to stick these functions in this module rather than using the module functions for ValueOption
-/// that come after FSharp.Core 4.5.2.
module ValueOptionInternal =
let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone
let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone
- let inline isSome x = match x with ValueSome _ -> true | ValueNone -> false
-
- let inline isNone x = match x with ValueSome _ -> false | ValueNone -> true
-
type String with
member inline x.StartsWithOrdinal(value) =
x.StartsWith(value, StringComparison.Ordinal)
diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs
index ff9dbbe52e2..872109989a7 100644
--- a/src/fsharp/NameResolution.fs
+++ b/src/fsharp/NameResolution.fs
@@ -1100,7 +1100,7 @@ let AddEntityForProvidedType (amap: Import.ImportMap, modref: ModuleOrNamespaceR
let tycon = Construct.NewProvidedTycon(resolutionEnvironment, st, importProvidedType, isSuppressRelocate, m)
modref.ModuleOrNamespaceType.AddProvidedTypeEntity(tycon)
let tcref = modref.NestedTyconRef tycon
- System.Diagnostics.Debug.Assert(ValueOptionInternal.isSome modref.TryDeref)
+ System.Diagnostics.Debug.Assert(modref.TryDeref.IsSome)
tcref
diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs
index 250fda33d06..769c3e5c4ae 100644
--- a/src/fsharp/Optimizer.fs
+++ b/src/fsharp/Optimizer.fs
@@ -3187,7 +3187,7 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) =
| None -> false
| Some mbrTyconRef ->
// Check we can deref system_MarshalByRefObject_tcref. When compiling against the Silverlight mscorlib we can't
- if ValueOptionInternal.isSome mbrTyconRef.TryDeref then
+ if mbrTyconRef.TryDeref.IsSome then
// Check if this is a subtype of MarshalByRefObject
assert (cenv.g.system_MarshalByRefObject_ty.IsSome)
ExistsSameHeadTypeInHierarchy cenv.g cenv.amap vref.Range (generalizedTyconRef tcref) cenv.g.system_MarshalByRefObject_ty.Value
diff --git a/src/fsharp/QuotationTranslator.fs b/src/fsharp/QuotationTranslator.fs
index 6166906244f..cd71d0b7598 100644
--- a/src/fsharp/QuotationTranslator.fs
+++ b/src/fsharp/QuotationTranslator.fs
@@ -66,7 +66,7 @@ type QuotationGenerationScope =
static member ComputeQuotationFormat g =
let deserializeExValRef = ValRefForIntrinsic g.deserialize_quoted_FSharp_40_plus_info
- if ValueOptionInternal.isSome deserializeExValRef.TryDeref then
+ if deserializeExValRef.TryDeref.IsSome then
QuotationSerializationFormat.FSharp_40_Plus
else
QuotationSerializationFormat.FSharp_20_Plus
diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs
index 7adcdfbee4e..e55e073e07e 100644
--- a/src/fsharp/symbols/Symbols.fs
+++ b/src/fsharp/symbols/Symbols.fs
@@ -86,7 +86,7 @@ module Impl =
let entityIsUnresolved(entity:EntityRef) =
match entity with
| ERefNonLocal(NonLocalEntityRef(ccu, _)) ->
- ccu.IsUnresolvedReference && ValueOptionInternal.isNone entity.TryDeref
+ ccu.IsUnresolvedReference && entity.TryDeref.IsNone
| _ -> false
let checkEntityIsResolved(entity:EntityRef) =
@@ -759,11 +759,11 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) =
let isUnresolved() =
- entityIsUnresolved v.TyconRef || ValueOptionInternal.isNone v.TryUnionCase
+ entityIsUnresolved v.TyconRef || v.TryUnionCase.IsNone
let checkIsResolved() =
checkEntityIsResolved v.TyconRef
- if ValueOptionInternal.isNone v.TryUnionCase then
+ if v.TryUnionCase.IsNone then
invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName)
member __.IsUnresolved =
@@ -878,8 +878,8 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) =
d.TryDeclaringTyconRef |> Option.exists entityIsUnresolved ||
match d with
| AnonField _ -> false
- | RecdOrClass v -> ValueOptionInternal.isNone v.TryRecdField
- | Union (v, _) -> ValueOptionInternal.isNone v.TryUnionCase
+ | RecdOrClass v -> v.TryRecdField.IsNone
+ | Union (v, _) -> v.TryUnionCase.IsNone
| ILField _ -> false
let checkIsResolved() =
@@ -887,10 +887,10 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) =
match d with
| AnonField _ -> ()
| RecdOrClass v ->
- if ValueOptionInternal.isNone v.TryRecdField then
+ if v.TryRecdField.IsNone then
invalidOp (sprintf "The record field '%s' could not be found in the target type" v.FieldName)
| Union (v, _) ->
- if ValueOptionInternal.isNone v.TryUnionCase then
+ if v.TryUnionCase.IsNone then
invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName)
| ILField _ -> ()
@@ -1382,7 +1382,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
let isUnresolved() =
match fsharpInfo() with
| None -> false
- | Some v -> ValueOptionInternal.isNone v.TryDeref
+ | Some v -> v.TryDeref.IsNone
let checkIsResolved() =
if isUnresolved() then
diff --git a/src/fsharp/tast.fs b/src/fsharp/tast.fs
index 687c81ce145..766bff82f6b 100644
--- a/src/fsharp/tast.fs
+++ b/src/fsharp/tast.fs
@@ -3309,7 +3309,7 @@ and
ValueSome tcr.binding
/// Is the destination assembly available?
- member tcr.CanDeref = ValueOptionInternal.isSome tcr.TryDeref
+ member tcr.CanDeref = tcr.TryDeref.IsSome
/// Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures.
member x.CompiledRepresentation = x.Deref.CompiledRepresentation
@@ -3860,7 +3860,9 @@ and
| None -> error(InternalError(sprintf "union case %s not found in type %s" x.CaseName x.TyconRef.LogicalName, x.TyconRef.Range))
/// Try to dereference the reference
- member x.TryUnionCase = x.TyconRef.TryDeref |> ValueOptionInternal.bind (fun tcref -> tcref.GetUnionCaseByName x.CaseName |> ValueOptionInternal.ofOption)
+ member x.TryUnionCase =
+ x.TyconRef.TryDeref
+ |> ValueOptionInternal.bind (fun tcref -> tcref.GetUnionCaseByName x.CaseName |> ValueOptionInternal.ofOption)
/// Get the attributes associated with the union case
member x.Attribs = x.UnionCase.Attribs
@@ -3919,7 +3921,9 @@ and
| None -> error(InternalError(sprintf "field %s not found in type %s" id tcref.LogicalName, tcref.Range))
/// Try to dereference the reference
- member x.TryRecdField = x.TyconRef.TryDeref |> ValueOptionInternal.bind (fun tcref -> tcref.GetFieldByName x.FieldName |> ValueOptionInternal.ofOption)
+ member x.TryRecdField =
+ x.TyconRef.TryDeref
+ |> ValueOptionInternal.bind (fun tcref -> tcref.GetFieldByName x.FieldName |> ValueOptionInternal.ofOption)
/// Get the attributes associated with the compiled property of the record field
member x.PropertyAttribs = x.RecdField.PropertyAttribs