diff --git a/.gitignore b/.gitignore
index 9a5400d0d2..4b905ca5d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,15 @@
# (These aren't generally useful to commit directly; if anything, they should be applied.)
scripts/*.patch
+/fcs/FSharp.Compiler.Service/illex.fs
+/fcs/FSharp.Compiler.Service/ilpars.fs
+/fcs/FSharp.Compiler.Service/ilpars.fsi
+/fcs/FSharp.Compiler.Service/lex.fs
+/fcs/FSharp.Compiler.Service/pars.fs
+/fcs/FSharp.Compiler.Service/pars.fsi
+/fcs/FSharp.Compiler.Service/pplex.fs
+/fcs/FSharp.Compiler.Service/pppars.fs
+/fcs/FSharp.Compiler.Service/pppars.fsi
/src/*.userprefs
/src/fsharp/FSStrings.resources
/src/fsharp/FSharp.Build/*.resx
@@ -21,29 +30,29 @@ scripts/*.patch
/src/fsharp/FSharp.Compiler.Server.Shared/*.resx
/src/fsharp/fsi/Fsi.sln
/src/fsharp/FSharp.Build/*.resources
-/src/fsharp/FSharp.Compiler/*.resx
-/src/fsharp/FSharp.Compiler/*.resources
-/src/fsharp/FSharp.Compiler/*.sln
-/src/fsharp/FSharp.Compiler/*.userprefs
+/src/fsharp/FSharp.Compiler.Private/*.resx
+/src/fsharp/FSharp.Compiler.Private/*.resources
+/src/fsharp/FSharp.Compiler.Private/*.sln
+/src/fsharp/FSharp.Compiler.Private/*.userprefs
/src/*.log
-/src/fsharp/FSharp.Compiler/illex.fs
-/src/fsharp/FSharp.Compiler/ilpars.fs
-/src/fsharp/FSharp.Compiler/ilpars.fsi
-/src/fsharp/FSharp.Compiler/lex.fs
-/src/fsharp/FSharp.Compiler/pars.fs
-/src/fsharp/FSharp.Compiler/pars.fsi
-/src/fsharp/FSharp.Compiler/pplex.fs
-/src/fsharp/FSharp.Compiler/pppars.fs
-/src/fsharp/FSharp.Compiler/pppars.fsi
-/src/fsharp/FSharp.Compiler-proto/illex.fs
-/src/fsharp/FSharp.Compiler-proto/ilpars.fs
-/src/fsharp/FSharp.Compiler-proto/ilpars.fsi
-/src/fsharp/FSharp.Compiler-proto/lex.fs
-/src/fsharp/FSharp.Compiler-proto/pars.fs
-/src/fsharp/FSharp.Compiler-proto/pars.fsi
-/src/fsharp/FSharp.Compiler-proto/pplex.fs
-/src/fsharp/FSharp.Compiler-proto/pppars.fs
-/src/fsharp/FSharp.Compiler-proto/pppars.fsi
+/src/fsharp/FSharp.Compiler.Private/illex.fs
+/src/fsharp/FSharp.Compiler.Private/ilpars.fs
+/src/fsharp/FSharp.Compiler.Private/ilpars.fsi
+/src/fsharp/FSharp.Compiler.Private/lex.fs
+/src/fsharp/FSharp.Compiler.Private/pars.fs
+/src/fsharp/FSharp.Compiler.Private/pars.fsi
+/src/fsharp/FSharp.Compiler.Private/pplex.fs
+/src/fsharp/FSharp.Compiler.Private/pppars.fs
+/src/fsharp/FSharp.Compiler.Private/pppars.fsi
+/src/fsharp/Fsc-proto/illex.fs
+/src/fsharp/Fsc-proto/ilpars.fs
+/src/fsharp/Fsc-proto/ilpars.fsi
+/src/fsharp/Fsc-proto/lex.fs
+/src/fsharp/Fsc-proto/pars.fs
+/src/fsharp/Fsc-proto/pars.fsi
+/src/fsharp/Fsc-proto/pplex.fs
+/src/fsharp/Fsc-proto/pppars.fs
+/src/fsharp/Fsc-proto/pppars.fsi
/src/fsharp/FSharp.LanguageService.Compiler/illex.*
/src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
/src/fsharp/FSharp.LanguageService.Compiler/lex.*
@@ -65,6 +74,8 @@ scripts/*.patch
/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.env
/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.lst
/tests/**/FSharp.Core.dll
+/tests/fsharp/optimize/stats/FSharpOptimizationInfo.FSharp.Core
+/tests/fsharp/optimize/stats/FSharpSignatureInfo.FSharp.Core
lib/debug
lib/release
lib/proto
diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config
new file mode 100644
index 0000000000..225a0237b7
--- /dev/null
+++ b/.nuget/NuGet.Config
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.nuget/NuGet.exe b/.nuget/NuGet.exe
new file mode 100644
index 0000000000..9f8781de0d
Binary files /dev/null and b/.nuget/NuGet.exe differ
diff --git a/.nuget/NuGet.targets b/.nuget/NuGet.targets
new file mode 100644
index 0000000000..82ece0f622
--- /dev/null
+++ b/.nuget/NuGet.targets
@@ -0,0 +1,138 @@
+
+
+
+ $(MSBuildProjectDirectory)\..\
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+ $([System.IO.Path]::Combine($(SolutionDir), ".nuget"))
+ $([System.IO.Path]::Combine($(ProjectDir), "packages.config"))
+
+
+
+
+ $(SolutionDir).nuget
+ packages.config
+ /Library/Frameworks/Mono.framework/Commands/mono
+ mono
+
+
+
+
+ $(NuGetToolsPath)\NuGet.exe
+ @(PackageSource)
+
+ "$(NuGetExePath)"
+ $(MonoPath) --runtime=v4.0.30319 $(NuGetExePath)
+
+ $(TargetDir.Trim('\\'))
+
+ -RequireConsent
+ -NonInteractive
+
+ "$(SolutionDir) "
+ "$(SolutionDir)"
+
+
+ $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
+ $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
+
+
+
+ RestorePackages;
+ $(BuildDependsOn);
+
+
+
+
+ $(BuildDependsOn);
+ BuildPackage;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 146fa9ee8d..a991ca14a4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,7 +16,7 @@ sudo: false
install:
script:
- - ./build.sh NuGet
+ - ./fcs/build.sh NuGet
# Fails on Travis OSX too often because there are network outages on that configuration getting the Mono MDK
diff --git a/CHANGELOG-fsharp.md b/CHANGELOG-fsharp.md
deleted file mode 100644
index b0cfed8286..0000000000
--- a/CHANGELOG-fsharp.md
+++ /dev/null
@@ -1,136 +0,0 @@
-4.1.15
- * fix regression on binding redirects for System.Collections.Immutable
-
-4.1.10
- * Integrate visualfsharp to 55ffe91
-
-4.1.9
- * Fix duplicate resources on OSX
-
-4.1.8
- * [Fix regression in Microsoft.Build.FSharp.targets](https://github.com/fsharp/fsharp/pull/707)
-
-4.1.7
- * [fix binding redirects for System.Collections.Immutable](https://github.com/fsharp/fsharp/issues/699)
-
-4.1.6
- * fix version of library going in /usr/lib/mono/fsharp
-
-4.1.4
- * [align fsc task and target file](https://github.com/fsharp/fsharp/pull/690)
- * [use install layout that includes mono/fsharp](https://github.com/fsharp/fsharp/pull/689)
- * [fix F# Intereactive on Mono 4.9+](https://github.com/fsharp/fsharp/pull/687)
-
-4.1.1
- * Update compiler tools
-
-4.1.0.2
- * Include DiaSymReader DLLs in nuget package
-
-4.1.0.0
- * Updates to FSharp.Core nuget package for F# 4.1
-
-4.0.1.21
- * Fix [#656](https://github.com/fsharp/fsharp/issues/656) - error FS0193: internal error: No access to the given key
-
-4.0.1.20
- * Fix #639 - Problems with F# scripts on Mono
-
-4.0.1.19
- * Fix FSharp.Compiler.Tools targets for .NET Core usage
-
-4.0.1.16
- * Fix FSharp.Compiler.Tools package dependencies
-
-4.0.1.15
- * Fix null condition in Fsc task
-
-4.0.1.13
- * Integrate visualfsharp master to 2002675/216a38b
-
-4.0.1.3
- * Integrate Microsoft\visualfsharp to 688c26bdbbfc766326fc45e4d918f87fcba1e7ba. F# 4.1 work
- * [Inlined function causes "FS0078: Unable to find the file"](https://github.com/fsharp/fsharp/issues/584)
-
-4.0.1.2
- * Integrate Microsoft\visualfsharp to 5d8126a. F# 4.1 work
- * FCS API integration and alignment
- * [#528 Compiler does not catch typing error in pattern matching when using literals](https://github.com/Microsoft/visualfsharp/issues/528)
- * [#659 Fsi fails to augment a type constructor](https://github.com/Microsoft/visualfsharp/issues/659)
- * [#807 Async.Choice](https://github.com/Microsoft/visualfsharp/pull/807)
- * [Response files for fsc/fsi](https://github.com/Microsoft/visualfsharp/pull/831)
- * [#919 Fix handling of optional IDispatch, IUnknown method args](https://github.com/Microsoft/visualfsharp/pull/919)
-
-4.0.1.1
- * Integrate Microsoft\visualfsharp to 8111c63. See CHANGELOG-visualfsharp.md for changes from Microsoft\visualfsharp
- * 04cd959 - fix problem with loop optimization
- * d995c59 - Assume we are inside XBuild when 4.5/Mono.Posix.dll exists
- * Fix [#483](https://github.com/fsharp/fsharp/issues/483) - Call to Type.GetType for a missing type causes FSI on Mono to produce an erroneous error
-
-4.0.0.4
- * Integrate Microsoft\visualfsharp to 2d413fb94. See CHANGELOG.md for changes from Microsoft\visualfsharp
-
-4.0.0.3
- * Fix build problems
-
-4.0.0.1
- * Integrate F# 4.0
-
-3.1.1.25
- * Upstream fix: implement correct version number scheme for new PCL profiles
-
-3.1.1.20
- * Upstream fix:: #! treated as a comment when it is at the start of an fsharp file
- * Upstream fix visualfsharp.codeplex.com issue #78 - allow space characters in active pattern case identifiers
- * Upstream fix visualfsharp.codeplex.com issue #78 - Adjust parser to disallow vertical pipes in active pattern case identifiers.
- * Upstream fix for visualfsharp.codeplex.com issue #69 - Invalid code generated when calling C# method with optional nullable args
- * Upstream fix for visualfsharp.codeplex.com issue #9 - XML doc comments on F# record type fields do not appear when accessing in C#
-
-3.1.1.19
- * Added files for the nuget packages
-
-3.1.1.18
- * Do not install FSharp.Build.dll in the GAC. It is not in the GAC on Windows.
-
-3.1.1.17
- * Remove service components from FSharp.Compiler.dll since. All clients should now use FSharp.Compiler.Service.dll
-
-3.1.1.15
- * Upstream 2d8ebcd43: XmlDoc generation bugfix: remove duplicate namespaces
- * Upstream 3bd52625b: Address-of optimizations for better performance on structs
- * Upstream c46aa237a: Perf improvement for Seq.windowed
- * Upstream 301a6f33: make it possible to set breakpoint inside quotation
- * FSharp.Core for portable profiles 7, 78, 259 if reference assemblies are present (delay-signed)
-
-3.1.1.14
- * Change monotouch and monodroid FSharp.Core.dll to both use 2.3.98.1
-
-3.1.1.12
- * Add build command "all-monotouch-monodroid"
-
-3.1.1.11
-
- * F# Interactive now uses .NET 4.5 profile
- * Fix for performance regression in 3.1 with extension members
- * Add query support to FSharp.Core portable profiles
- * Fix problem with building portable libraries (https://github.com/fsharp/fsharp/issues/299)
-
-3.1.1.10
- * Include fixes from Microsoft included with Visual F# Tools 3.1.1
-
-3.1.1.7
- * Build back versions of FSharp.Core 2.3.0.0, 2.3.5.0, 4.3.0.0 to include code generation fix.
- * Build Profile7 (portable47) FSharp.Core
-
-3.0.30
- * Partial fix for allowing F# 3.1 projects to compile using xbuild (also
- requires xbuild fix)
-
- * Remove a multitude of links in xbuild directories in favour of targets
- files which include the canonical targets
-
-3.0.29
-
- * Proper DESTDIR support (very useful for making custom deb/rpm packages)
-
-
diff --git a/CHANGELOG-visualfsharp.md b/CHANGELOG-visualfsharp.md
deleted file mode 100644
index 1c1ea83329..0000000000
--- a/CHANGELOG-visualfsharp.md
+++ /dev/null
@@ -1,231 +0,0 @@
-
- Copyright (c) Microsoft Corporation. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0.
- See License.txt in the project root for license information.
-
-Visual F#
-======================
-
-All notable changes to this project will be documented in this file.
-
-### [4.0.0] - Visual Studio 2015 Update 1 - 30 November 2015
-
-#### Enhancements
-* Perf: `for i in expr do body` optimization [#219](https://github.com/Microsoft/visualfsharp/pull/219)
-* Remove type provider security dialog and use custom icon for type provider assembly reference [#448](https://github.com/Microsoft/visualfsharp/pull/448)
-* Perf: Enable parallel build inside Visual Studio [#487](https://github.com/Microsoft/visualfsharp/pull/487)
-* Perf: Remove StructBox for Value Types [#549](https://github.com/Microsoft/visualfsharp/pull/549)
-* Add compiler warnings for redundant arguments in raise/failwith/failwithf/nullArg/invalidOp/invalidArg [#630](https://github.com/Microsoft/visualfsharp/pull/630)
-* Add a compiler warning for lower case literals in patterns [#666](https://github.com/Microsoft/visualfsharp/pull/666)
-
-#### Bug fixes
-* Fix scope of types for named values in attributes improperly set [#437](https://github.com/Microsoft/visualfsharp/pull/437)
-* Add general check for escaping typars to check phase [#442](https://github.com/Microsoft/visualfsharp/pull/442)
-* Fix AccessViolationException on obfuscated assemblies [#519](https://github.com/Microsoft/visualfsharp/pull/519)
-* Fix memory leaks while reloading solutions in Visual Studio [#591](https://github.com/Microsoft/visualfsharp/pull/591)
-* Enable breakpoints in `with` augmentations for class types [#608](https://github.com/Microsoft/visualfsharp/pull/608)
-* Fix false escaping type parameter check error [#613](https://github.com/Microsoft/visualfsharp/pull/613)
-* Fix quotation of readonly fields [#622](https://github.com/Microsoft/visualfsharp/pull/622)
-* Keep the reference icons when opening references [#623](https://github.com/Microsoft/visualfsharp/pull/623)
-* Don't suppress missing FSI transitive references [#626](https://github.com/Microsoft/visualfsharp/pull/626)
-* Make Seq.cast's non-generic and generic IEnumerable implementations equivalent [#651](https://github.com/Microsoft/visualfsharp/pull/651)
-
-### [4.0.0] - 20 July 2015
-
-Includes commits up to `dd8252eb8d20aaedf7b1c7576cd2a8a82d24f587`
-
-#### Language, compiler, runtime, interactive
-
-* Normalization and expansion of `Array`, `List`, and `Seq` modules
- * New APIs for 4.0: `chunkBySize`, `contains`, `except`, `findBack`, `findInstanceBack`, `indexed`, `item`, `mapFold`, `mapFoldBack`, `sortByDescending`, `sortDescending`, `splitInto`, `tryFindBack`, `tryFindIndexBack`, `tryHead`, `tryItem`, `tryLast`
- 
-* Other new APIs
- * `Option.filter`, `Option.toObj`, `Option.ofObj`, `Option.toNullable`, `Option.ofNullable`
- * `String.filter`
- * `Checked.int8`, `Checked.uint8`
- * `Async.AwaitTask` (non-generic)
- * `WebClient.AsyncDownloadFile`, `WebClient.AsyncDownloadData`
- * `tryUnbox`, `isNull`
-* New active pattern to match constant `Decimal` in quotations
-* Slicing support for lists
-* Support for consuming high-rank (> 4) arrays
-* Support for units of measure in `printf`-family functions
-* Support for constructors/class names as first-class functions
-* Improved exception stack traces in async code
-* Automatic `mutable`/`ref` conversion
-* Support for static arguments to provided methods
-* Support for non-nullable provided types
-* Added `NonStructuralComparison` module containing non-structural comparison operators
-* Support for rational exponents in units of measure
-* Give fsi.exe, fsiAnyCpi.exe nice icons
-* `Microsoft.` optional in namepsace paths from FSharp.Core
-* Support for extension properties in object initializers
-* Pre-support (not yet used) for additional nativeptr intrinsics
-* Simplified, more robust resolution of type references in quotations
-* Support for inheritance of types that have multiple interface instantiations
-* Extended preprocessor grammar
-* Support for implicit quotation of expressions used as method arguments
-* Support for multiple properties in `[]`
-* Eliminate tuple allocation for implicitly returned formal arguments
-* Perf: fsc.exe now uses `GCLatencyMode.Batch`
-* Perf: Improved `hash`/`compare`/`distinctBy`/`groupBy` performance
-* Perf: `Seq.toArray` perf improvement
-* Perf: Use `OptimizedClosures.FSharpFunc` in seq.fs where applicable
-* Perf: Use literals and mutable variables instead of ref cells for better performance in SHA1 calc
-* Perf: Use smart blend of `System.Array.Copy` and iterative copy for array copies
-* Perf: Change `Seq.toList` to mutation-based to remove reliance on `List.rev`
-* Perf: Change `pdbClose` to test if files are locked before inducing GCs
-* Perf: Use server GC mode for compiler
-* Bugfix: Changed an error message within the Set module to use the correct module name.
-* Bugfix: Fix assembly name of warning FS2003
-* Bugfix [#132](http://visualfsharp.codeplex.com/workitem/132): FSI Shadowcopy causes a significant degrade in the fsi first execute time
-* Bugfix [#131](https://visualfsharp.codeplex.com/workitem/131): Fix getentryassembly return value when shadowcopy is enabled in FSI
-* Bugfix [#61](https://visualfsharp.codeplex.com/workitem/61) Nonverifiable code generated with units of measure conversion
-* Bugfix [#68](https://visualfsharp.codeplex.com/workitem/68) BadImageFormatException with Units of Measure
-* Bugfix [#146](https://visualfsharp.codeplex.com/workitem/146) BadImageFormatException in both Release and Debug build with units of measure
-* Bugfix: Incorrent cross-module inlining between different .NET profiles
-* Bugfix: Properly document exceptions in `Array` module
-* Bugfix [#24](https://visualfsharp.codeplex.com/workitem/24): Error reporting of exceptions in type providers `AddMemberDelayed`
-* Bugfix [#13](https://github.com/fsharp/fsharp/issues/13): Error on FSI terminal resize
-* Bugfix [#29](https://github.com/fsharp/fsharp/issues/29): Module access modifier `internal` does not give internal access if no namespaces are used
-* Bugfix: Fix typo in error message for invalid attribute combination
-* Bugfix [#27](https://github.com/microsoft/visualfsharp/issues/27): Private module values can be mutated by other modules
-* Bugfix [#38](https://github.com/microsoft/visualfsharp/issues/38): ICE - System.ArgumentException: not a measure abbreviation, or incorrect kind
-* Bugfix [#44](https://github.com/microsoft/visualfsharp/issues/44): Problems using FSI to `#load` multiple files contributing to the same namespace
-* Bugfix [#95](https://github.com/microsoft/visualfsharp/issues/95): `[]` allows access to DU member if qualified only by module name
-* Bugfix [#89](https://github.com/microsoft/visualfsharp/issues/89): Embedding an untyped quotation in a typed quotation results in ArgumentException
-* Bugfix: Show warning when Record is accessed without type but `[]` was set
-* Bugfix [#139](https://visualfsharp.codeplex.com/workitem/139): Memory leak in `Async.AwaitWaitHandle`
-* Bugfix [#122](https://github.com/microsoft/visualfsharp/issues/122): `stfld` does not give `.volatile` annotation
-* Bugfix [#30](https://github.com/microsoft/visualfsharp/issues/30): Compilation error "Incorrect number of type arguments to local call"
-* Bugfix [#163](https://github.com/microsoft/visualfsharp/issues/163): Array slicing does not work properly with non 0-based arrays
-* Bugfix [#148](https://github.com/microsoft/visualfsharp/issues/148): XML doc comment generation adding empty garbage
-* Bugfix [#98](https://github.com/Microsoft/visualfsharp/issues/98): Using a single, optional, static parameter to a type provider causes failure
-* Bugfix [#109](https://github.com/Microsoft/visualfsharp/issues/109): Invalid interface generated by --sig
-* Bugfix [#123](https://github.com/Microsoft/visualfsharp/issues/123): Union types without sub-classes should be sealed
-* Bugfix [#68](https://github.com/Microsoft/visualfsharp/issues/68): F# 3.1 / Profile 259: `<@ System.Exception() @>` causes AmbiguousMatchException at runtime
-* Bugfix [#9](https://github.com/Microsoft/visualfsharp/issues/9): Internal error in FSI: FS0192: binding null type in envBindTypeRef
-* Bugfix [#10](https://github.com/Microsoft/visualfsharp/issues/10): Internal error: binding null type in envBindTypeRef
-* Bugfix [#266](https://github.com/Microsoft/visualfsharp/issues/266): `windowed` error message incorrectly flags "non-negative" input when "positive" is what's needed
-* Bugfix [#270](https://github.com/Microsoft/visualfsharp/issues/270): "internal error: null: convTypeRefAux" in interactive when consuming quotation containing type name with commas or spaces
-* Bugfix [#276](https://github.com/Microsoft/visualfsharp/issues/276): Combining struct field with units of measure will result managed type instead of unmanaged type
-* Bugfix [#269](https://github.com/Microsoft/visualfsharp/issues/269): Accidentally `#load`ing a DLL in script causes internal error
-* Bugfix [#293](https://github.com/Microsoft/visualfsharp/issues/293): `#r` references without relative path are not loaded when file is local
-* Bugfix [#237](https://github.com/Microsoft/visualfsharp/issues/237): Problems using FSI on multiple namespaces in a single file
-* Bugfix [#338](https://github.com/Microsoft/visualfsharp/issues/338): Escaped unicode characters are encoded incorrectly
-* Bugfix [#370](https://github.com/Microsoft/visualfsharp/issues/370): `Seq.sortBy` cannot handle sequences of floats containing NaN
-* Bugfix [#368](https://github.com/Microsoft/visualfsharp/issues/368): Optimizer incorrectly assumes immutable field accesses are side-effect free
-* Bugfix [#337](https://github.com/Microsoft/visualfsharp/issues/337): Skip interfaces that lie outside the set of referenced assemblies
-* Bugfix [#383](https://github.com/Microsoft/visualfsharp/issues/383): Class with `[]` barred from inheriting from normal non-nullable class
-* Bugfix [#420](https://github.com/Microsoft/visualfsharp/issues/420): Compiler emits incorrect visibility modifier for internal constructors of abstract class
-* Bugfix [#362](https://github.com/Microsoft/visualfsharp/issues/362): Depickling assertion followed by nullref internal errors in units-of-measure case
-* Bugfix [#342](https://github.com/Microsoft/visualfsharp/issues/342): FS0193 error when specifying sequential struct layout of a type
-* Bugfix [#299](https://github.com/Microsoft/visualfsharp/issues/299): AmbiguousMatchException with `[]` on overloaded extension methods
-* Bugfix [#316](https://github.com/Microsoft/visualfsharp/issues/316): Null array-valued attribute causes internal compiler error
-* Bugfix [#147](https://github.com/Microsoft/visualfsharp/issues/147): FS0073: internal error: Undefined or unsolved type variable: 'a
-* Bugfix [#34](https://github.com/Microsoft/visualfsharp/issues/34): Error in pass2 for type FSharp.DataFrame.FSharpFrameExtensions, error: duplicate entry 'Frame2.GroupRowsBy' in method table
-* Bugfix [#212](https://github.com/Microsoft/visualfsharp/issues/212): Record fields initialized in wrong order
-* Bugfix [#445](https://github.com/Microsoft/visualfsharp/issues/445): Inconsistent compiler prompt message when using `--pause` switch
-* Bugfix [#238](https://github.com/Microsoft/visualfsharp/issues/238): Generic use of member constraint solved to record field causes crash
-
-#### Visual Studio
-
-* Updated all templates (except tutorial) to include AssemblyInfo.fs setup in the same manner as default C# project templates
-* Add keyboard shortcuts for FSI reset and clear all
-* Improved debugger view for Map values
-* Improved performance reading stdout/stderr from fsi.exe to F# Interactive window
-* Support for VS project up-to-date check
-* Improved project template descriptions, make it clearer how to target Xamarin platforms
-* Intellisense completion in object initializers
-* Add menu entry "Open folder in File Explorer" on folder nodes
-* Intellisense completion for named arguments
-* `Alt+Enter` sends current line of code to interactive if there is no selection
-* Support for debugging F# scripts with the VS debugger
-* Add support for hexadecimal values (like 0xFF) ??to MSBuild property BaseAddress
-* Updated menu icons used for F# interactive to align with other VS interactive windows
-* Bugfix: Fix url of fsharp.org website in vs templates
-* Bugfix [#141](https://visualfsharp.codeplex.com/workitem/141): The "Error List" window does not parse MSBuild messages correctly
-* Bugfix [#147](https://visualfsharp.codeplex.com/workitem/147): Go to definition doesn't work for default struct ctors
-* Bugfix [#50](https://github.com/microsoft/visualfsharp/issues/50): Members hidden from IntelliSense still show up in tooltips
-* Bugfix [#57](https://github.com/microsoft/visualfsharp/issues/57) (partial): Visual Studio locking access to XML doc files
-* Bugfix [#157](https://github.com/Microsoft/visualfsharp/issues/157): Should not allow Framework 4 / F# 3.1 combination in project properties
-* Bugfix [#114](https://github.com/Microsoft/visualfsharp/issues/114): Portable Library (legacy) template displays wrong target framework version
-* Bugfix [#273](https://github.com/Microsoft/visualfsharp/issues/273): VS editor shows bogus errors when scripts use multi-hop `#r` and `#load` with relative paths
-* Bugfix [#312](https://github.com/Microsoft/visualfsharp/issues/312): F# library project templates and portable library templates do not have `AutoGenerateBindingRedirects` set to true
-* Bugfix [#321](https://github.com/Microsoft/visualfsharp/issues/321): Provided type quickinfo shouldn't show hidden and obsolete members from base class
-* Bugfix [#319](https://github.com/Microsoft/visualfsharp/issues/319): Projects with target runtime 3.0 don't show up correctly on the VS project dialog
-* Bugfix [#283](https://github.com/Microsoft/visualfsharp/issues/283): Changing target framework causes incorrect binding redirects to be added to app.config
-* Bugfix [#278](https://github.com/Microsoft/visualfsharp/issues/278): NullReferenceException when trying to add some COM references
-* Bugfix [#259](https://github.com/Microsoft/visualfsharp/issues/259): Renaming files in folders causes strange UI display
-* Bugfix [#350](https://github.com/Microsoft/visualfsharp/issues/350): Renaming linked file results in error dialog
-* Bugfix [#381](https://github.com/Microsoft/visualfsharp/issues/381): Intellisense stops working when referencing PCL component from script (requires `#r "System.Runtime"`)
-* Bugfix [#104](https://github.com/Microsoft/visualfsharp/issues/104): Using paste to add files to an F# project causes the order of files in the project and on the UI to get out of sync
-* Bugfix [#417](https://github.com/Microsoft/visualfsharp/issues/417): 'Move file up/down' keybindings should be scoped to solution explorer
-* Bugfix [#246](https://github.com/Microsoft/visualfsharp/issues/246): Fix invalid already rendered folder error
-* Bugfix [#106](https://github.com/Microsoft/visualfsharp/issues/106) (partial): Visual F# Tools leak memory while reloading solutions
-
-### [3.1.2] - 20 August 2014
-
-Includes commits up to `3385e58aabc91368c8e1f551650ba48705aaa285`
-
-#### Language, compiler, runtime, interactive
-
-* Allow arbitrary-dimensional slicing
-* Ship versions FSharp.Core.dll built on portable profiles 78 and 259
-* Support "shebang" (`#!`) in F# source files
-* Vertical pipes disallowed in active pattern case identifiers
-* Enable non-locking shadow copy of reference assemblies in fsi/fsianycpu
-* Inline codegen optimization using structs
-* Perf improvement for `Seq.windowed`
-* exe.config files for fsc, fsi, fsianycpu now use simple version range instead of long set of explicit version redirects
-* Bugfix [#72](https://visualfsharp.codeplex.com/workitem/72): Indexer properties with more than 4 arguments cannot be accessed
-* Bugfix [#113](https://visualfsharp.codeplex.com/workitem/113): `Async.Sleep` in .NETCore profiles does not invoke error continuation
-* Bugfix [#91](https://visualfsharp.codeplex.com/workitem/91): String module documentation is false
-* Bugfix [#78](https://visualfsharp.codeplex.com/workitem/78): Allow space characters in active pattern case identifiers
-* Bugfix: Invalid code generated when calling VB methods with optional byref args
-* Bugfix [#69](https://visualfsharp.codeplex.com/workitem/69): Invalid code generated when calling C# method with optional nullable args
-* Bugfix [#9](https://visualfsharp.codeplex.com/workitem/9): XML doc comments on F# record type fields do not appear when accessing in C#
-* Bugfix [#59](https://visualfsharp.codeplex.com/workitem/59): Compiler always requires System.Runtime.InteropServices, this is not present in all portable profiles
-* Bugfix [#17](https://visualfsharp.codeplex.com/workitem/17): Incorrect generation of XML from doc comments for Record fields
-* Bugfix [#7](https://visualfsharp.codeplex.com/workitem/17): NullRef in list comprehension, when for loop works
-* Bugfix [#1](https://visualfsharp.codeplex.com/workitem/1): Type inference involving generic param arrays
-* Bugfix [#37](https://visualfsharp.codeplex.com/workitem/37): Perf regression in 3.1.0 related to resolving extension methods
-* Bugfix: Can't run F# console application with 'update' in name
-* Bugfix: Slicing and range expression inconsistent
-* Bugfix: Invalid code is generated when using field initializers in struct constructor
-
-#### Visual Studio
-
-* Project templates for F# portable libraries targeting profiles 78 and 259
-* Enable non-locking shadow copy of reference assemblies in fsi/fsianycpu (VS options added)
-* Allow breakpoints to be set inside of quotations
-* Support "Publish" action in project system for web, Azure
-* Bugfix [#126](https://visualfsharp.codeplex.com/workitem/126): F# package installer does not honor custom install paths for express SKUs
-* Bugfix [#75](https://visualfsharp.codeplex.com/workitem/75): Microsoft.FSharp.targets shim not deployed with F# SDK
-* Bugfix: Fix crash in smart indent provider
-* Bugfix [#55](https://visualfsharp.codeplex.com/workitem/55): Cannot add reference to F# PCL project
-* Bugfix: Typos in tutorial project script
-* Bugfix: Required C# event members do not appear in intellisense when signature is (object, byref)
-
-
-### [3.1.1] - 24 January 2014
-
-#### Language, compiler, runtime, interactive
-
-* Improve F# compiler telemetry
-* Bugfix: Improper treatment of * in AssemblyVersion attribute
-* Bugfix: ``sprintf "%%"`` returns `"%%"` in F# 3.1.0, previously returned `"%"` in F# 3.0 and earlier
-* Bugfix: F# 3.0 1D slice setter does not compile in F# 3.1.0
-
-#### Visual Studio
-
-* Enable installation of Visual F# on VS Desktop Express
-* Added support for showing xml doc comments for named arguments
-* Visual F# package deployable on non-VS machines. Deploys compiler and runtime toolchain plus msbuild targets
-* Bugfix: Errors when attempting to add reference to .NET core library
-* Bugfix: Crash in `FSComp.SR.RunStartupValidation()`
-
-[4.0.0]: http://fsharp.org
-[3.1.2]: http://blogs.msdn.com/b/fsharpteam/archive/2014/08/20/announcing-the-release-of-visual-f-tools-3-1-2.aspx
-[3.1.1]: http://blogs.msdn.com/b/fsharpteam/archive/2014/01/22/announcing-visual-f-3-1-1-and-support-for-desktop-express.aspx
diff --git a/DEVGUIDE.md b/DEVGUIDE.md
new file mode 100644
index 0000000000..5abd611460
--- /dev/null
+++ b/DEVGUIDE.md
@@ -0,0 +1,212 @@
+# Development Guide
+
+Follow the instructions below to build and develop the F# Compiler, Core Library and tools on Windows, macOS and Linux.
+
+* [Developing the F# Compiler (Windows)](#developing-the-f-compiler-windows)
+* [Developing the F# Compiler (Linux)](#developing-the-f-compiler-linux)
+* [Developing the F# Compiler (macOS)](#developing-the-f-compiler-macos)
+* [Developing the Visual F# IDE Tools (Windows Only)](#developing-the-visual-f-ide-tools-windows-only)
+* [Notes and Resources](#notes)
+
+### Developing the F# Compiler (Windows)
+
+Install
+
+- [.NET 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40779)
+- [MSBuild 12.0](http://www.microsoft.com/en-us/download/details.aspx?id=40760)
+
+On Windows you can build the F# compiler for .NET Framework as follows:
+
+ build.cmd
+
+This is the same as
+
+ build.cmd net40
+
+There are various qualifiers:
+
+ build.cmd release -- build release (the default)
+ build.cmd debug -- build debug instead of release
+
+ build.cmd net40 -- build .NET Framework compiler (the default)
+ build.cmd coreclr -- build .NET Core compiler
+ build.cmd vs -- build the Visual F# IDE Tools (see below)
+ build.cmd pcls -- build the PCL FSharp.Core libraries
+ build.cmd all -- build all
+
+ build.cmd proto -- force the rebuild of the Proto bootstrap compiler in addition to other things
+
+ build.cmd test -- build default targets, run suitable tests
+ build.cmd net40 test -- build net40, run suitable tests
+ build.cmd coreclr test -- build coreclr, run suitable tests
+ build.cmd vs test -- build Visual F# IDE Tools, run all tests (see below)
+ build.cmd all test -- build all, run all tests
+
+ build.cmd test-smoke -- build, run smoke tests
+ build.cmd test-net40-fsharp -- build, run tests\fsharp suite for .NET Framework
+ build.cmd test-net40-fsharpqa -- build, run tests\fsharpqa suite for .NET Framework
+
+After you build the first time you can open and use this solution:
+
+ .\FSharp.sln
+
+or just build it directly:
+
+ msbuild FSharp.sln
+
+Building ``FSharp.sln`` builds nearly everything. However building portable profiles of
+FSharp.Core.dll is not included. If you are just developing the core compiler and library
+then building the solution will be enough.
+
+### Developing the F# Compiler (Linux)
+
+For Linux/Mono, follow [these instructions](http://www.mono-project.com/docs/getting-started/install/linux/). Also you may need:
+
+ sudo apt-get install mono-complete autoconf libtool pkg-config make git automake
+
+Then:
+
+ ./autoconf.sh --prefix /usr
+ make
+ make install
+
+Full testing is not yet enabled on Linux, nor is a .NET Core build of the compiler.
+
+You can alternatively use
+
+ ./build.sh
+
+### Developing the F# Compiler (macOS)
+
+Install Xamarin Studio, then
+
+ ./autogen.sh --prefix=/Library/Frameworks/Mono.framework/Versions/Current/
+ make
+ sudo make install
+
+### Developing the Visual F# IDE Tools (Windows Only)
+
+To build and test Visual F# IDE Tools, install these requirements:
+- [Visual Studio 2017](https://www.visualstudio.com/downloads/)
+ - Under the "Windows" workloads, select ".NET desktop development"
+ - Select "F# language support" under the optional components
+ - Under the "Other Toolsets" workloads, select "Visual Studio extension development"
+ - Under the "Individual components" tab select "Windows 10 SDK" as shown below (needed for compiling RC resource, see #2556): \
+ 
+ - Failing to install this will lead to error FS0193: Could not find file visualfsharp\vsintegration\src\FSharp.ProjectSystem.FSharp\obj\net40\ProjectResources.rc.res.
+
+Steps to build:
+
+ build.cmd vs -- build the Visual F# IDE Tools in Release configuration (see below)
+ build.cmd vs debug -- build the Visual F# IDE Tools in Debug configuration (see below)
+ build.cmd vs test -- build Visual F# IDE Tools, run all tests (see below)
+
+Use ``VisualFSharp.sln`` if you're building the Visual F# IDE Tools.
+
+
+Note on Debug vs Release: ``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the ``Debug`` configuration. For more information see https://github.com/Microsoft/visualfsharp/issues/2771 and https://github.com/Microsoft/visualfsharp/pull/2773.
+
+Note: if you face this error [#2351](https://github.com/Microsoft/visualfsharp/issues/2351):
+
+> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe".
+
+Or hard crash on launch ("Unknown Error"), delete these folders:
+
+* `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev`
+* `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)`
+
+#### [Optional] Install the Visual F# IDE Tools (Windows Only)
+
+At time of writing, the Visual F# IDE Tools can only be installed into the latest Visual Studio 2017 RC releases.
+The new builds of the Visual F# IDE Tools can no longer be installed into Visual Studio 2015.
+
+You can install Visual Studio 2017 from https://www.visualstudio.com/downloads/.
+
+**Note:** This step will install a VSIX extension into Visual Studio "Next" that changes the Visual F# IDE Tools
+components installed in that VS installation. You can revert this step by disabling or uninstalling the addin.
+
+For **Debug**, uninstall then reinstall:
+
+ VSIXInstaller.exe /u:"VisualFSharp"
+ VSIXInstaller.exe debug\net40\bin\VisualFSharpOpenSource.vsix
+
+For **Release**, uninstall then reinstall:
+
+ VSIXInstaller.exe /u:"VisualFSharp"
+ VSIXInstaller.exe release\net40\bin\VisualFSharpOpenSource.vsix
+
+Restart Visual Studio, it should now be running your freshly-built Visual F# IDE Tools with updated F# Interactive.
+
+#### [Optional] F5 testing of local changes
+
+To test your changes locally _without_ overwriting your default installed Visual F# tools, set the `VisualFSharp\Vsix\VisualFSharpOpenSource`
+project as the startup project. When you hit F5 a new instance of Visual Studio will be started in the `RoslynDev` hive with your
+changes, but the root (default) hive will remain untouched. You can also start this hive automatically using
+
+ devenv.exe /rootsuffix RoslynDev
+
+Because this uses the "RoslynDev" hive you can simultaneously test changes to an appropriate build of Roslyn binaries.
+
+
+#### [Optional] Rapid deployment of incremental changes to Visual F# IDE Tools components
+
+For the brave, you can rapidly deploy incrementally updated versions of Visual F# IDE Tool components such as ``FSHarp.Editor.dll`` by copying them directly into the extension directory in your user AppData folder:
+
+ xcopy /y debug\net40\bin\FSharp.* "%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\15.0_7c5620b7FSharpDev\Extensions\Microsoft.VisualFSharpTools\Visual F# Tools\15.4.1.9055"
+
+This gives a much tighter inner development loop than uninstalling/reinstalling the VSIX, as you do not have to restart VIsual Studio. Caveat emptor.
+
+#### [Optional] Clobber the F# SDK on the machine
+
+**Note:** The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsc.exe`` used by the standard install location or ``Microsoft.FSharp.Targets``. **Repairing Visual Studio 15 is currently the only way to revert this step.**
+
+For **Debug**:
+
+ vsintegration\update-vsintegration.cmd debug
+
+For **Release**:
+
+ vsintegration\update-vsintegration.cmd release
+
+
+# Notes
+
+#### Windows: Links to Additional frameworks
+
+- [Git for windows](http://msysgit.github.io/)
+- [.NET 3.5](http://www.microsoft.com/en-us/download/details.aspx?id=21)
+- [.NET 4.5](http://www.microsoft.com/en-us/download/details.aspx?id=30653)
+- [.NET 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40779)
+- [.NET 4.6](http://www.microsoft.com/en-us/download/details.aspx?id=48137)
+- [MSBuild 12.0](http://www.microsoft.com/en-us/download/details.aspx?id=40760)
+- [Windows 7 SDK](http://www.microsoft.com/en-us/download/details.aspx?id=8279)
+- [Windows 8 SDK](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx)
+- [Windows 8.1 SDK](http://msdn.microsoft.com/en-us/library/windows/desktop/bg162891.aspx)
+- [Windows 10 SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk)
+
+
+#### Notes on the Windows .NET Framework build
+
+1. The `update.cmd` script adds required strong name validation skips, and NGens the compiler and libraries. This requires admin privileges.
+1. The compiler binaries produced are "private" and strong-named signed with a test key.
+1. Some additional tools are required to build the compiler, notably `fslex.exe`, `fsyacc.exe`, `FSharp.PowerPack.Build.Tasks.dll`, `FsSrGen.exe`, `FSharp.SRGen.Build.Tasks.dll`, and the other tools found in the `lkg` directory.
+1. The overall bootstrapping process executes as follows
+ - We first need an existing F# compiler. We use the one in the `lkg` directory. Let's assume this compiler has an `FSharp.Core.dll` with version X.
+ - We use this compiler to compile the source in this distribution, to produce a "proto" compiler, dropped to the `proto` directory. When run, this compiler still relies on `FSharp.Core.dll` with version X.
+ - We use the proto compiler to compile the source for `FSharp.Core.dll` in this distribution.
+ - We use the proto compiler to compile the source for `FSharp.Compiler.dll`, `fsc.exe`, `fsi.exe`, and other binaries found in this distribution.
+
+#### Configuring proxy server
+
+If you are behind a proxy server, NuGet client tool must be configured to use it:
+
+ .nuget\nuget.exe config -set http_proxy=proxy.domain.com:8080 -ConfigFile .nuget\NuGet.Config
+ .nuget\nuget.exe config -set http_proxy.user=user_name -ConfigFile .nuget\NuGet.Config
+ .nuget\nuget.exe config -set http_proxy.password=user_password -ConfigFile .nuget\NuGet.Config
+
+Where you should set proper proxy address, user name and password.
+
+#### Resources
+
+The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide.
+
diff --git a/DotnetCLIToolsVersion.txt b/DotnetCLIToolsVersion.txt
new file mode 100644
index 0000000000..0286f3da09
--- /dev/null
+++ b/DotnetCLIToolsVersion.txt
@@ -0,0 +1 @@
+2.0.0-preview2-006502
diff --git a/FSharp.Compiler.Service.netcore.sln b/FSharp.Compiler.Service.netcore.sln
deleted file mode 100644
index fc874f7783..0000000000
--- a/FSharp.Compiler.Service.netcore.sln
+++ /dev/null
@@ -1,89 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26124.0
-MinimumVisualStudioVersion = 15.0.26124.0
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C359421F-622E-4E66-9893-19310EA7F5AB}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fsharp", "fsharp", "{16543C7E-1DBC-4053-A923-9C05E155E8A7}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.netcore", "src\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.netcore.fsproj", "{36B9F520-14B1-4431-AAF2-75433B87D851}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCracker.netcore", "src\fsharp\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.netcore.fsproj", "{5F1CB2F1-B98A-4072-9777-219A93B4AB93}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCrackerTool.netcore", "src\fsharp\FSharp.Compiler.Service.ProjectCrackerTool\FSharp.Compiler.Service.ProjectCrackerTool.netcore.fsproj", "{1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{81813410-487C-4486-95AF-41671011C4C5}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.Compiler.Service.Tests.netcore", "tests\service\FSharp.Compiler.Service.Tests.netcore.fsproj", "{1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x64.ActiveCfg = Debug|x64
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x64.Build.0 = Debug|x64
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x86.ActiveCfg = Debug|x86
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x86.Build.0 = Debug|x86
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|Any CPU.Build.0 = Release|Any CPU
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x64.ActiveCfg = Release|x64
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x64.Build.0 = Release|x64
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x86.ActiveCfg = Release|x86
- {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x86.Build.0 = Release|x86
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Debug|x64.ActiveCfg = Debug|x64
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Debug|x64.Build.0 = Debug|x64
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Debug|x86.ActiveCfg = Debug|x86
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Debug|x86.Build.0 = Debug|x86
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Release|Any CPU.Build.0 = Release|Any CPU
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Release|x64.ActiveCfg = Release|x64
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Release|x64.Build.0 = Release|x64
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Release|x86.ActiveCfg = Release|x86
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93}.Release|x86.Build.0 = Release|x86
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Debug|x64.ActiveCfg = Debug|x64
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Debug|x64.Build.0 = Debug|x64
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Debug|x86.ActiveCfg = Debug|x86
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Debug|x86.Build.0 = Debug|x86
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Release|Any CPU.Build.0 = Release|Any CPU
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Release|x64.ActiveCfg = Release|x64
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Release|x64.Build.0 = Release|x64
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Release|x86.ActiveCfg = Release|x86
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94}.Release|x86.Build.0 = Release|x86
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x64.ActiveCfg = Debug|x64
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x64.Build.0 = Debug|x64
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x86.ActiveCfg = Debug|x86
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x86.Build.0 = Debug|x86
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|Any CPU.Build.0 = Release|Any CPU
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x64.ActiveCfg = Release|x64
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x64.Build.0 = Release|x64
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x86.ActiveCfg = Release|x86
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {16543C7E-1DBC-4053-A923-9C05E155E8A7} = {C359421F-622E-4E66-9893-19310EA7F5AB}
- {36B9F520-14B1-4431-AAF2-75433B87D851} = {16543C7E-1DBC-4053-A923-9C05E155E8A7}
- {5F1CB2F1-B98A-4072-9777-219A93B4AB93} = {16543C7E-1DBC-4053-A923-9C05E155E8A7}
- {1B0F19D7-17CD-4610-9B56-AC7C3C45CB94} = {16543C7E-1DBC-4053-A923-9C05E155E8A7}
- {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7} = {81813410-487C-4486-95AF-41671011C4C5}
- EndGlobalSection
-EndGlobal
diff --git a/FSharp.Compiler.Service.sln b/FSharp.Compiler.Service.sln
deleted file mode 100644
index bb7f97e377..0000000000
--- a/FSharp.Compiler.Service.sln
+++ /dev/null
@@ -1,244 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{B6B68AE6-E7A4-4D43-9B34-FFA74BFE192B}"
- ProjectSection(SolutionItems) = preProject
- build.cmd = build.cmd
- build.fsx = build.fsx
- build.sh = build.sh
- nuget\FSharp.Compiler.Service.nuspec = nuget\FSharp.Compiler.Service.nuspec
- paket.dependencies = paket.dependencies
- README.md = README.md
- RELEASE_NOTES.md = RELEASE_NOTES.md
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{83FEE492-6701-4E59-9184-16B1D30E91F8}"
- ProjectSection(SolutionItems) = preProject
- docs\content\caches.fsx = docs\content\caches.fsx
- docs\content\corelib.fsx = docs\content\corelib.fsx
- docs\content\devnotes.md = docs\content\devnotes.md
- docs\content\editor.fsx = docs\content\editor.fsx
- docs\content\filesystem.fsx = docs\content\filesystem.fsx
- docs\content\fsharp-readme.md = docs\content\fsharp-readme.md
- docs\content\index.md = docs\content\index.md
- docs\content\interactive.fsx = docs\content\interactive.fsx
- docs\content\project.fsx = docs\content\project.fsx
- docs\content\queue.fsx = docs\content\queue.fsx
- docs\content\symbols.fsx = docs\content\symbols.fsx
- docs\content\tokenizer.fsx = docs\content\tokenizer.fsx
- docs\content\typedtree.fsx = docs\content\typedtree.fsx
- docs\content\untypedtree.fsx = docs\content\untypedtree.fsx
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0554567F-1DCB-46A5-9EF2-E1938A3D4F14}"
- ProjectSection(SolutionItems) = preProject
- docs\tools\generate.fsx = docs\tools\generate.fsx
- docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml
- EndProjectSection
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service", "src\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E396742E-B4E5-4584-A9E4-CC1A491F5BC1}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "EditorService", "samples\EditorService\EditorService.fsproj", "{A40507D6-FA48-43D3-B18A-AE3DAACE4020}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "InteractiveService", "samples\InteractiveService\InteractiveService.fsproj", "{067E95E5-E3DC-4CA7-813A-4D1E277D2D52}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tokenizer", "samples\Tokenizer\Tokenizer.fsproj", "{92793069-816F-4F69-84AC-0966F8275E65}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "samples\UntypedTree\UntypedTree.fsproj", "{C816728D-BBEA-472D-9F6C-E8913957A673}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.Tests", "tests\service\FSharp.Compiler.Service.Tests.fsproj", "{5EF9FF95-1C75-458A-983A-168E43945913}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCrackerTool", "src\fsharp\FSharp.Compiler.Service.ProjectCrackerTool\FSharp.Compiler.Service.ProjectCrackerTool.fsproj", "{B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCracker", "src\fsharp\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj", "{893C3CD9-5AF8-4027-A667-21E62FC2C703}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestTP", "tests\service\data\TestTP\TestTP.fsproj", "{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{098D1C35-D0FB-4720-83DD-8002293EA237}"
- ProjectSection(SolutionItems) = preProject
- .gitattributes = .gitattributes
- .gitignore = .gitignore
- .travis.yml = .travis.yml
- appveyor.yml = appveyor.yml
- NuGet.Config = NuGet.Config
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{9020E136-794A-473F-9B1B-9623C97B7161}"
- ProjectSection(SolutionItems) = preProject
- nuget\FSharp.Compiler.Service.template = nuget\FSharp.Compiler.Service.template
- nuget\projectcracker.template = nuget\projectcracker.template
- EndProjectSection
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.MSBuild.v12", "src\fsharp\FSharp.Compiler.Service.MSBuild.v12\FSharp.Compiler.Service.MSBuild.v12.fsproj", "{8157B50E-397D-4232-A4E0-1977AFC7076D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.Build.0 = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.ActiveCfg = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.Build.0 = Release|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|x86.ActiveCfg = Debug|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Any CPU.Build.0 = Release|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|x86.ActiveCfg = Release|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|x86.ActiveCfg = Debug|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Any CPU.Build.0 = Release|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|x86.ActiveCfg = Release|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Debug|x86.ActiveCfg = Debug|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Release|Any CPU.Build.0 = Release|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Release|x86.ActiveCfg = Release|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|x86.ActiveCfg = Debug|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.Build.0 = Release|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|x86.ActiveCfg = Release|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Debug|x86.ActiveCfg = Debug|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Release|Any CPU.Build.0 = Release|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {5EF9FF95-1C75-458A-983A-168E43945913}.Release|x86.ActiveCfg = Release|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|x86.ActiveCfg = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0 = Release|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|x86.ActiveCfg = Release|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|x86.ActiveCfg = Debug|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.Build.0 = Release|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|x86.ActiveCfg = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|x86.Build.0 = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Any CPU.Build.0 = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|x86.ActiveCfg = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|x86.Build.0 = Release|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Debug|x86.ActiveCfg = Debug|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Release|Any CPU.Build.0 = Release|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Release|x86.ActiveCfg = Release|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Debug|x86.ActiveCfg = Debug|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Release|Any CPU.Build.0 = Release|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Release|x86.ActiveCfg = Release|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|x86.Build.0 = Debug|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Any CPU.Build.0 = Release|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|x86.ActiveCfg = Release|Any CPU
- {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|x86.Build.0 = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|x86.Build.0 = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Any CPU.Build.0 = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|x86.ActiveCfg = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|x86.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {0554567F-1DCB-46A5-9EF2-E1938A3D4F14} = {83FEE492-6701-4E59-9184-16B1D30E91F8}
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {92793069-816F-4F69-84AC-0966F8275E65} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {C816728D-BBEA-472D-9F6C-E8913957A673} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {C94C257C-3C0A-4858-B5D8-D746498D1F08} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {F9540CA8-1CE0-4546-A23A-A461E416E95B} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- EndGlobalSection
-EndGlobal
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
index 4668ba7b2c..452ecef05d 100644
--- a/ISSUE_TEMPLATE.md
+++ b/ISSUE_TEMPLATE.md
@@ -10,6 +10,9 @@ Provide the steps required to reproduce the problem
2. Step B
+If possible attach a zip file with the repro case. This often makes it easier for others to reproduce.
+The zip file should ideally represent the situation just before the call/step that is problematic.
+
#### Expected behavior
Provide a description of the expected behaviour.
@@ -33,5 +36,3 @@ Provide any related information
* Links to F# RFCs or entries on https://github.com/fsharp/fslang-suggestions
* Links to performance testing scripts
* Indications of severity
-
-
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..7900fa869d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,127 @@
+include $(topsrcdir)mono/config.make
+
+.PHONY: restore
+
+restore:
+ MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config
+
+# Make the proto using the bootstrap, then make the final compiler using the proto
+# We call MAKE sequentially because we don't want build-final to explicitly depend on build-proto,
+# as that causes a complete recompilation of both proto and final everytime you touch the
+# compiler sources.
+all:
+ $(MAKE) build-proto
+ $(MAKE) build
+
+build-proto: restore
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=Proto /p:TargetFramework=$(TargetFramework) src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=Proto /p:TargetFramework=$(TargetFramework) src/fsharp/Fsc-proto/Fsc-proto.fsproj
+
+# The main targets
+build:
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/FSharp.Build/FSharp.Build.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/Fsc/Fsc.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/fsi/Fsi.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/fsiAnyCpu/FsiAnyCPU.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 /p:FSharpCoreBackVersion=3.0 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 /p:FSharpCoreBackVersion=3.1 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=net40 /p:FSharpCoreBackVersion=4.0 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+ $(MAKE) -C mono/policy.2.0.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.2.3.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.3.3.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.3.7.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.3.47.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.3.78.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.3.259.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.4.0.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.4.3.FSharp.Core TargetFramework=net40 $@
+ $(MAKE) -C mono/policy.4.4.FSharp.Core TargetFramework=net40 $@
+ifeq ("$(pclenabled47)", "yes")
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=portable47 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+endif
+ifeq ("$(pclenabled7)", "yes")
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=portable7 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+endif
+ifeq ("$(pclenabled78)", "yes")
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=portable78 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+endif
+ifeq ("$(pclenabled259)", "yes")
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=portable259 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+endif
+ifeq ("$(monodroidenabled)", "yes")
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=monoandroid10+monotouch10+xamarinios10 src/fsharp/FSharp.Core/FSharp.Core.fsproj
+endif
+ifeq ("$(xamarinmacenabled)", "yes")
+ MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=xamarinmacmobile src/fsharp/FSharp.Core/FSharp.Core.fsproj
+endif
+
+
+
+install:
+ -rm -fr $(DESTDIR)$(monodir)/fsharp
+ -rm -fr $(DESTDIR)$(monodir)/Microsoft\ F#
+ -rm -fr $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#
+ -rm -fr $(DESTDIR)$(monodir)/gac/FSharp.Core
+ -rm -fr $(DESTDIR)$(monodir)/gac/FSharp.Compiler.Private
+ -rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp
+ -rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp
+ -rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp
+ -rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp
+ -rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp
+ $(MAKE) -C mono/FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/FSharp.Build install
+ $(MAKE) -C mono/FSharp.Compiler.Private install
+ $(MAKE) -C mono/Fsc install
+ $(MAKE) -C mono/FSharp.Compiler.Interactive.Settings install
+ $(MAKE) -C mono/FSharp.Compiler.Server.Shared install
+ $(MAKE) -C mono/fsi install
+ $(MAKE) -C mono/fsiAnyCpu install
+ $(MAKE) -C mono/FSharp.Core TargetFramework=net40 FSharpCoreBackVersion=3.0 install
+ $(MAKE) -C mono/FSharp.Core TargetFramework=net40 FSharpCoreBackVersion=3.1 install
+ $(MAKE) -C mono/FSharp.Core TargetFramework=net40 FSharpCoreBackVersion=4.0 install
+ $(MAKE) -C mono/policy.2.0.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.2.3.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.3.3.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.3.7.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.3.47.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.3.78.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.3.259.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.4.0.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.4.3.FSharp.Core TargetFramework=net40 install
+ $(MAKE) -C mono/policy.4.4.FSharp.Core TargetFramework=net40 install
+ifeq ("$(pclenabled47)", "yes")
+ $(MAKE) -C mono/FSharp.Core TargetFramework=portable47 install
+endif
+ifeq ("$(pclenabled7)", "yes")
+ $(MAKE) -C mono/FSharp.Core TargetFramework=portable7 install
+endif
+ifeq ("$(pclenabled78)", "yes")
+ $(MAKE) -C mono/FSharp.Core TargetFramework=portable78 install
+endif
+ifeq ("$(pclenabled259)", "yes")
+ $(MAKE) -C mono/FSharp.Core TargetFramework=portable259 install
+endif
+ifeq ("$(monodroidenabled)", "yes")
+ $(MAKE) -C mono/FSharp.Core TargetFramework=monoandroid10+monotouch10+xamarinios10 install
+endif
+ifeq ("$(xamarinmacenabled)", "yes")
+ $(MAKE) -C mono/FSharp.Core TargetFramework=xamarinmacmobile install
+endif
+ echo "------------------------------ INSTALLED FILES --------------"
+ ls -xlR $(DESTDIR)$(monodir)/fsharp $(DESTDIR)$(monodir)/xbuild $(DESTDIR)$(monodir)/gac/FSharp* $(DESTDIR)$(monodir)/Microsoft*
+
+dist:
+ -rm -r fsharp-$(DISTVERSION) fsharp-$(DISTVERSION).tar.bz2
+ mkdir -p fsharp-$(DISTVERSION)
+ (cd $(topdir) && git archive HEAD |(cd $(builddir)fsharp-$(DISTVERSION) && tar xf -))
+ list='$(EXTRA_DIST)'; for s in $$list; do \
+ (cp $(topdir)$$s fsharp-$(DISTVERSION)/$$s) \
+ done;
+ tar cvjf fsharp-$(DISTVERSION).tar.bz2 $(patsubst %,--exclude=%, $(NO_DIST)) fsharp-$(DISTVERSION)
+ du -b fsharp-$(DISTVERSION).tar.bz2
+
diff --git a/README.md b/README.md
index 7815a4a731..899c779b16 100644
--- a/README.md
+++ b/README.md
@@ -19,18 +19,20 @@ Build and Test
.NET Framework:
- Install [.NET 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40779) and [MSBuild 12.0](http://www.microsoft.com/en-us/download/details.aspx?id=40760)
+ fcs\build.cmd Test.NetFx
- build.cmd All.NetFx
- (unix: ./build.sh All.NetFx)
+ fcs/build.sh Test.NetFx
-.NET Core
+.NET Core / .NET Standard
- build All.NetCore
+ fcs\build.cmd Test.NetStd
-Both:
+ fcs/build.sh Test.NetStd
- build All
+Packages:
+
+ build NuGet
+ build TestAndNuGet
Build Status
@@ -55,4 +57,4 @@ Maintainers
The maintainers of this repository from the F# Core Engineering Group are:
- [Don Syme](http://github.com/dsyme), [Dave Thomas](http://github.com/7sharp9), [Enrico Sada](http://github.com/enricosada)
- - with help and guidance from [Robin Neatherway](https://github.com/rneatherway), [Tomas Petricek](http://github.com/tpetricek), [Lincoln Atkinson](http://github.com/latkin), [Kevin Ransom](http://github.com/KevinRansom), [Vladimir Matveev](http://github.com/vladima) and others
+ - with help and guidance from [Robin Neatherway](https://github.com/rneatherway), [Tomas Petricek](http://github.com/tpetricek), [Lincoln Atkinson](http://github.com/latkin), [Kevin Ransom](http://github.com/KevinRansom), [Vladimir Matveev](http://github.com/vladima) and others
\ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
index f447bbee5a..af7031073b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,9 +1,7 @@
-os: Visual Studio 2015
+os: Visual Studio 2017
environment:
- CLI_VERSION: 1.0.1
- matrix:
- - BUILD_TARGET: CreatePackage
+ CLI_VERSION: 2.0.0
install:
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
@@ -17,12 +15,10 @@ init:
build_script:
- cmd: dotnet --info
- - cmd: build.cmd %BUILD_TARGET%
+ - cmd: fcs\build.cmd TestAndNuGet
test: off
version: '{build}'
artifacts:
- - path: artefacts\release\*.nupkg
- type: NuGetPackage
- - path: artefacts\debug\*.nupkg
+ - path: release\*.nupkg
type: NuGetPackage
diff --git a/before_install.sh b/before_install.sh
new file mode 100755
index 0000000000..db4e9cbf67
--- /dev/null
+++ b/before_install.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# OS detection
+
+OSName=$(uname -s)
+case $OSName in
+ Darwin)
+ OS=OSX
+ ;;
+
+ Linux)
+ OS=Linux
+ ;;
+
+ *)
+ echo "Unsupported OS '$OSName' detected. Cannot continue with build, the scripts must be updated to support this OS."
+ exit 1
+ ;;
+esac
+
+# On Linux (or at least, Ubuntu), when building with Mono, need to install the mono-devel package first.
+if [ $OS = 'Linux' ]; then
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+ echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
+ sudo apt-get update
+ sudo apt-get -y install mono-devel autoconf libtool pkg-config make git
+fi
+
+# Check if SSL certificates have been imported into Mono's certificate store.
+# If certs haven't been installed, some/all of the Nuget packages will fail to restore.
+# Note, the result of the certmgr and grep commands returns the number of installed X.509 certificates.
+# We need to run the command twice -- on some systems (e.g. macOS) the certs are installed in the user store,
+# and on other systems (e.g., Ubuntu) they're installed to the machine store. certmgr only shows what's in
+# the selected store, which is why we need to check both.
+if [ "$(certmgr -list -c Trust | grep -c -F "X.509")" -le 1 ] && [ "$(certmgr -list -c -m Trust | grep -c -F "X.509")" -le 1 ]; then
+ echo "No SSL certificates installed so unable to restore NuGet packages." >&2;
+ echo "Run 'mozroots --sync --import' to install certificates to Mono's certificate store." >&2;
+ exit 1
+fi
+
+# Restore NuGet packages (needed for compiler bootstrap and tests).
+mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config
+
+(if test x-$BUILD_CORECLR = x-1; then \
+ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'; \
+ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893; \
+ sudo apt-get update; \
+ sudo apt-get -y install dotnet-dev-1.0.0-preview2-003131; \
+ (cd tests/fsharp; mono ../../.nuget/NuGet.exe restore project.json -PackagesDirectory ../../packages -ConfigFile ../../.nuget/NuGet.Config); \
+ ./init-tools.sh; \
+ echo "------ start log"; \
+ cat ./init-tools.log; echo "------ end log"; \
+fi)
+
+(if test x-$BUILD_PROTO_WITH_CORECLR_LKG = x-1; then \
+ (cd lkg/fsc && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \
+ (cd lkg/fsi && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \
+fi)
+
+#TODO: work out how to avoid the need for this
+chmod u+x packages/FSharp.Compiler.Tools.4.1.23/tools/fsi.exe
+chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe
+chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe
+
+# The FSharp.Compiler.Tools package doesn't work correctly unless a proper install of F# has been done on the machine.
+# OSX can skip this because the OSX Mono installer includes F#.
+if [ $OS != 'OSX' ]; then
+ sudo apt-get -y install fsharp
+fi
+
+# "access to the path /etc/mono/registry/last-time is denied"
+# On non-OSX systems, may need to create Mono's registry folder to avoid exceptions during builds.
+# This doesn't seem to be necessary on OSX, as the folder is created by the installer.
+if [ $OS != 'OSX' ]; then
+ # This registry folder path is correct for Linux;
+ # on OSX the folder is /Library/Frameworks/Mono.framework/Versions/Current/etc/mono/registry
+ # and may be different for *BSD systems.
+ __MonoRegistryDir="/etc/mono/registry"
+ if [ ! -d "$__MonoRegistryDir" ]; then
+ echo "Mono registry directory does not exist (it may not have been created yet)."
+ echo "The directory needs to be created now; superuser permissions are required for this."
+ { sudo -- sh -c "mkdir -p $__MonoRegistryDir && chmod uog+rw $__MonoRegistryDir"; } || { echo "Unable to create/chmod Mono registry directory '$__MonoRegistryDir'." >&2; }
+ fi
+fi
diff --git a/build-everything.proj b/build-everything.proj
new file mode 100644
index 0000000000..a169a82cc5
--- /dev/null
+++ b/build-everything.proj
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.fsx b/build.fsx
deleted file mode 100644
index 82c30fd2a9..0000000000
--- a/build.fsx
+++ /dev/null
@@ -1,418 +0,0 @@
-// --------------------------------------------------------------------------------------
-// FAKE build script
-// --------------------------------------------------------------------------------------
-
-#I "packages/FAKE/tools"
-#r "packages/FAKE/tools/FakeLib.dll"
-open System
-open Fake.AppVeyor
-open Fake
-open Fake.Git
-open Fake.ReleaseNotesHelper
-open Fake.UserInputHelper
-open Fake.AssemblyInfoFile
-
-#if MONO
-// prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196)
-System.Console.OutputEncoding <- System.Text.Encoding.UTF8
-#endif
-
-// --------------------------------------------------------------------------------------
-// Information about the project to be used at NuGet and in AssemblyInfo files
-// --------------------------------------------------------------------------------------
-
-let project = "FSharp.Compiler.Service"
-let authors = ["Microsoft Corporation, Dave Thomas, Anh-Dung Phan, Tomas Petricek"]
-
-let gitOwner = "fsharp"
-let gitHome = "https://github.com/" + gitOwner
-
-let gitName = "FSharp.Compiler.Service"
-let gitRaw = environVarOrDefault "gitRaw" "https://raw.githubusercontent.com/fsharp"
-
-let netFrameworks = [(* "v4.0"; *) "v4.5"]
-
-// --------------------------------------------------------------------------------------
-// The rest of the code is standard F# build script
-// --------------------------------------------------------------------------------------
-
-let buildDir = "bin"
-let releaseDir = "artefacts/release"
-let debugDir = "artefacts/debug"
-
-
-let publishDebugPackage = environVar "DEBUG_PACKAGE_PUBLISH" = "true"
-let buildDebugPackage = publishDebugPackage || environVar "DEBUG_PACKAGE" <> "false"
-
-// Read release notes & version info from RELEASE_NOTES.md
-let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md")
-let isAppVeyorBuild = buildServer = BuildServer.AppVeyor
-let isVersionTag tag = Version.TryParse tag |> fst
-let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName
-let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion
-let nugetVersion = release.NugetVersion
-open SemVerHelper
-let nugetDebugVersion =
- let semVer = SemVerHelper.parse nugetVersion
- let debugPatch, debugPreRelease =
- match semVer.PreRelease with
- | None -> semVer.Patch + 1, { Origin = "alpha001"; Name = "alpha"; Number = Some 1; Parts = [AlphaNumeric "alpha001"] }
- | Some pre ->
- let num = match pre.Number with Some i -> i + 1 | None -> 1
- let name = pre.Name
- let newOrigin = sprintf "%s%03d" name num
- semVer.Patch, { Origin = newOrigin; Name = name; Number = Some num; Parts = [AlphaNumeric newOrigin] }
- let debugVer =
- { semVer with
- Patch = debugPatch
- PreRelease = Some debugPreRelease }
- debugVer.ToString()
-let buildDate = DateTime.UtcNow
-let buildVersion =
- if hasRepoVersionTag then assemblyVersion
- else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber
- else assemblyVersion
-
-let netcoresln = gitName + ".netcore.sln";
-
-Target "BuildVersion" (fun _ ->
- Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
-)
-
-// Generate assembly info files with the right version & up-to-date information
-Target "AssemblyInfo" (fun _ ->
- let fileName = "src/assemblyinfo/assemblyinfo.shared.fs"
- CreateFSharpAssemblyInfo fileName
- [ Attribute.Version assemblyVersion
- Attribute.FileVersion assemblyVersion
- Attribute.InformationalVersion assemblyVersion ]
-)
-
-// --------------------------------------------------------------------------------------
-// Clean build results & restore NuGet packages
-
-Target "Clean" (fun _ ->
- CleanDirs [ buildDir; releaseDir; debugDir ]
-)
-
-Target "CleanDocs" (fun _ ->
- CleanDirs ["docs"]
-)
-
-Target "Build.NetFx" (fun _ ->
- netFrameworks
- |> List.iter (fun framework ->
- !! (project + ".sln")
- |> MSBuild "" "Build" ["Configuration","Release"; "TargetFrameworkVersion", framework]
- |> Log (".NET " + framework + " Build-Output: "))
- CopyDir releaseDir buildDir allFiles
- CleanDir buildDir
-)
-
-Target "Build.NetFx.Debug" (fun _ ->
- netFrameworks
- |> List.iter (fun framework ->
- !! (project + ".sln")
- |> MSBuild "" "Build" ["Configuration","Debug"; "TargetFrameworkVersion", framework]
- |> Log (".NET " + framework + " Build-Output: "))
- CopyDir debugDir buildDir allFiles
- CleanDir buildDir
-)
-
-// --------------------------------------------------------------------------------------
-// Run the unit tests using test runner
-
-Target "RunTests.NetFx" (fun _ ->
- // Tests seem to depend on this path :/
- CopyDir buildDir releaseDir allFiles
- !! (if isAppVeyorBuild then sprintf "./bin/v4.5/FSharp.Compiler.Service.Tests.dll"
- else sprintf "./bin/**/FSharp.Compiler.Service.Tests.dll")
- |> NUnit (fun p ->
- { p with
- Framework = "v4.0.30319"
- DisableShadowCopy = true
- TimeOut = TimeSpan.FromMinutes 20.
- OutputFile = "TestResults.xml" })
- CleanDir buildDir
-)
-
-// --------------------------------------------------------------------------------------
-// Build a NuGet package
-Target "NuGet.NetFx" (fun _ ->
- CopyDir buildDir releaseDir allFiles
- Paket.Pack (fun p ->
- { p with
- TemplateFile = "nuget/FSharp.Compiler.Service.template"
- Version = nugetVersion
- OutputPath = releaseDir
- ReleaseNotes = toLines release.Notes })
- Paket.Pack (fun p ->
- { p with
- TemplateFile = "nuget/FSharp.Compiler.Service.ProjectCracker.template"
- Version = nugetVersion
- OutputPath = releaseDir
- ReleaseNotes = toLines release.Notes })
- Paket.Pack (fun p ->
- { p with
- TemplateFile = "nuget/FSharp.Compiler.Service.MSBuild.v12.template"
- Version = nugetVersion
- OutputPath = releaseDir
- ReleaseNotes = toLines release.Notes })
- CleanDir buildDir
-)
-Target "NuGet.NetFx.Debug" (fun _ ->
- CopyDir buildDir debugDir allFiles
- Paket.Pack (fun p ->
- { p with
- TemplateFile = "nuget/FSharp.Compiler.Service.template"
- Version = nugetDebugVersion
- OutputPath = debugDir
- ReleaseNotes = toLines release.Notes })
- Paket.Pack (fun p ->
- { p with
- TemplateFile = "nuget/FSharp.Compiler.Service.ProjectCracker.template"
- Version = nugetDebugVersion
- OutputPath = debugDir
- ReleaseNotes = toLines release.Notes })
- Paket.Pack (fun p ->
- { p with
- TemplateFile = "nuget/FSharp.Compiler.Service.MSBuild.v12.template"
- Version = nugetDebugVersion
- OutputPath = debugDir
- ReleaseNotes = toLines release.Notes })
- CleanDir buildDir
-)
-
-
-Target "PublishNuGet" (fun _ ->
- Paket.Push (fun p ->
- let apikey =
- match getBuildParam "nuget-apikey" with
- | s when not (String.IsNullOrWhiteSpace s) -> s
- | _ -> getUserInput "Nuget API Key: "
- { p with
- ApiKey = apikey
- WorkingDir = releaseDir })
- if publishDebugPackage then
- Paket.Push (fun p ->
- let apikey =
- match getBuildParam "nuget-apikey" with
- | s when not (String.IsNullOrWhiteSpace s) -> s
- | _ -> getUserInput "Nuget API Key: "
- { p with
- ApiKey = apikey
- WorkingDir = debugDir })
-)
-
-// --------------------------------------------------------------------------------------
-// Generate the documentation
-
-Target "GenerateDocs" (fun _ ->
- executeFSIWithArgs "docsrc/tools" "generate.fsx" ["--define:RELEASE"] [] |> ignore
-)
-
-Target "GenerateDocsJa" (fun _ ->
- executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" ["--define:RELEASE"] [] |> ignore
-)
-
-// --------------------------------------------------------------------------------------
-// Release Scripts
-
-
-#load "paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx"
-open Octokit
-
-Target "GitHubRelease" (fun _ ->
- let user =
- match getBuildParam "github-user" with
- | s when not (String.IsNullOrWhiteSpace s) -> s
- | _ -> getUserInput "GitHub Username: "
- let pw =
- match getBuildParam "github-pw" with
- | s when not (String.IsNullOrWhiteSpace s) -> s
- | _ -> getUserPassword "GitHub Password: "
- let remote =
- Git.CommandHelper.getGitResult "" "remote -v"
- |> Seq.filter (fun (s: string) -> s.EndsWith("(push)"))
- |> Seq.tryFind (fun (s: string) -> s.Contains(gitOwner + "/" + gitName))
- |> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0]
-
- StageAll ""
- Git.Commit.Commit "" (sprintf "Bump version to %s (%s)" nugetVersion nugetDebugVersion)
- Branches.pushBranch "" remote (Information.getBranchName "")
-
- Branches.tag "" nugetVersion
- Branches.pushTag "" remote nugetVersion
- if publishDebugPackage then
- Branches.tag "" nugetDebugVersion
- Branches.pushTag "" remote nugetDebugVersion
-
- // release on github
- createClient user pw
- |> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
- |> uploadFile (releaseDir>("FSharp.Compiler.Service." + nugetVersion + ".nupkg"))
- |> releaseDraft
- |> Async.RunSynchronously
-
- if publishDebugPackage then
- createClient user pw
- |> createDraft gitOwner gitName nugetDebugVersion true release.Notes
- |> uploadFile (debugDir>("FSharp.Compiler.Service." + nugetDebugVersion + ".nupkg"))
- |> releaseDraft
- |> Async.RunSynchronously
-)
-
-// --------------------------------------------------------------------------------------
-// .NET Core and .NET Core SDK
-
-let isDotnetSDKInstalled =
- match Fake.EnvironmentHelper.environVarOrNone "FCS_DNC" with
- | Some flag ->
- match bool.TryParse flag with
- | true, result -> result
- | _ -> false
- | None ->
- try
- Shell.Exec("dotnet", "--info") = 0
- with
- _ -> false
-
-let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x
-let runCmdIn mono workDir exe = Printf.ksprintf (fun args ->
- if mono
- then
- printfn "mono %s/%s %s" workDir exe args
- Shell.Exec("mono", sprintf "%s %s" exe args, workDir)
- |> assertExitCodeZero
- else
- printfn "%s/%s %s" workDir exe args
- Shell.Exec(exe, args, workDir)
- |> assertExitCodeZero
-)
-let run mono exe = runCmdIn mono "." exe
-
-Target "CodeGen.NetCore" (fun _ ->
- let lexArgs = "--lexlib Internal.Utilities.Text.Lexing"
- let yaccArgs = "--internal --parslib Internal.Utilities.Text.Parsing"
- let module1 = "--module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser"
- let module2 = "--module Microsoft.FSharp.Compiler.Parser"
- let module3 = "--module Microsoft.FSharp.Compiler.PPParser"
- let open1 = "--open Microsoft.FSharp.Compiler.AbstractIL"
- let open2 = "--open Microsoft.FSharp.Compiler"
- let open3 = "--open Microsoft.FSharp.Compiler"
-
- // restore all the required tools, declared in each fsproj
- run false "dotnet" "restore %s" netcoresln
- run false "dotnet" "restore %s" "tools.fsproj"
-
- // run tools
- let toolDir = "packages/FsLexYacc/build"
- let fcsNetcore = "src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.netcore.fsproj"
- let fsLex fsl out = runCmdIn isMono "." (sprintf "%s/fslex.exe" toolDir) "%s --unicode %s -o %s" fsl lexArgs out
- let fsYacc fsy out m o = runCmdIn isMono "." (sprintf "%s/fsyacc.exe" toolDir) "%s %s %s %s %s -o %s" fsy lexArgs yaccArgs m o out
-
- run false "dotnet" "fssrgen src/fsharp/FSComp.txt src/fsharp/FSharp.Compiler.Service/FSComp.fs src/fsharp/FSharp.Compiler.Service/FSComp.resx"
- run false "dotnet" "fssrgen src/fsharp/fsi/FSIstrings.txt src/fsharp/FSharp.Compiler.Service/FSIstrings.fs src/fsharp/FSharp.Compiler.Service/FSIstrings.resx"
- fsLex "src/fsharp/lex.fsl" "src/fsharp/FSharp.Compiler.Service/lex.fs"
- fsLex "src/fsharp/pplex.fsl" "src/fsharp/FSharp.Compiler.Service/pplex.fs"
- fsLex "src/absil/illex.fsl" "src/fsharp/FSharp.Compiler.Service/illex.fs"
- fsYacc "src/absil/ilpars.fsy" "src/fsharp/FSharp.Compiler.Service/ilpars.fs" module1 open1
- fsYacc "src/fsharp/pars.fsy" "src/fsharp/FSharp.Compiler.Service/pars.fs" module2 open2
- fsYacc "src/fsharp/pppars.fsy" "src/fsharp/FSharp.Compiler.Service/pppars.fs" module3 open3
-)
-
-Target "Build.NetCore" (fun _ ->
- run false "dotnet" "pack %s -v n -c Release" netcoresln
-)
-
-Target "Build.NetCore.Debug" (fun _ ->
- run false "dotnet" "pack %s -v n -c Debug" netcoresln
-)
-
-Target "RunTests.NetCore" (fun _ ->
- run false "dotnet" "run -p tests/service/FSharp.Compiler.Service.Tests.netcore.fsproj -c Release -- --result:TestResults.NetCore.xml;format=nunit3"
-)
-
-
-//use dotnet-mergenupkg to merge the .netcore nuget package into the default one
-Target "Nuget.AddNetCore" (fun _ ->
- do
- let nupkg = sprintf "%s/FSharp.Compiler.Service.%s.nupkg" releaseDir release.AssemblyVersion
- let netcoreNupkg = sprintf "src/fsharp/FSharp.Compiler.Service/bin/Release/FSharp.Compiler.Service.%s.nupkg" release.AssemblyVersion
- runCmdIn false "." "dotnet" "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg
-
- do
- let nupkg = sprintf "%s/FSharp.Compiler.Service.ProjectCracker.%s.nupkg" releaseDir release.AssemblyVersion
- let netcoreNupkg = sprintf "src/fsharp/FSharp.Compiler.Service.ProjectCracker/bin/Release/FSharp.Compiler.Service.ProjectCracker.%s.nupkg" release.AssemblyVersion
- runCmdIn false "." "dotnet" "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg
-)
-
-Target "Nuget.AddNetCore.Debug" (fun _ ->
- do
- let nupkg = sprintf "%s/FSharp.Compiler.Service.%s.nupkg" debugDir nugetDebugVersion
- let netcoreNupkg = sprintf "src/fsharp/FSharp.Compiler.Service/bin/Debug/FSharp.Compiler.Service.%s.nupkg" release.AssemblyVersion
- runCmdIn false "." "dotnet" "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg
-
- do
- let nupkg = sprintf "%s/FSharp.Compiler.Service.ProjectCracker.%s.nupkg" debugDir nugetDebugVersion
- let netcoreNupkg = sprintf "src/fsharp/FSharp.Compiler.Service.ProjectCracker/bin/Debug/FSharp.Compiler.Service.ProjectCracker.%s.nupkg" release.AssemblyVersion
- runCmdIn false "." "dotnet" "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg
-)
-
-// --------------------------------------------------------------------------------------
-// Run all targets by default. Invoke 'build ' to override
-
-Target "Release" DoNothing
-Target "CreatePackage" DoNothing
-Target "NuGet" DoNothing
-Target "All" DoNothing
-Target "All.NetCore" DoNothing
-Target "All.NetFx" DoNothing
-
-"Clean"
- =?> ("BuildVersion", isAppVeyorBuild)
- ==> "AssemblyInfo"
- ==> "CodeGen.NetCore"
- ==> "Build.NetCore"
- =?> ("Build.NetCore.Debug", buildDebugPackage)
- ==> "RunTests.NetCore"
- ==> "All.NetCore"
-
-"Clean"
- =?> ("BuildVersion", isAppVeyorBuild)
- ==> "AssemblyInfo"
- ==> "Build.NetFx"
- =?> ("Build.NetFx.Debug", buildDebugPackage)
- ==> "RunTests.NetFx"
- ==> "All.NetFx"
-
-"All.NetFx"
- =?> ("All.NetCore", isDotnetSDKInstalled)
- ==> "All"
-
-"All.NetCore"
- ==> "Nuget.AddNetCore"
-
-"All.NetCore"
- =?> ("Nuget.AddNetCore.Debug", buildDebugPackage)
-
-"All.NetFx"
- ==> "NuGet.NetFx"
- =?> ("NuGet.NetFx.Debug", buildDebugPackage)
- =?> ("Nuget.AddNetCore", isDotnetSDKInstalled)
- =?> ("Nuget.AddNetCore.Debug", buildDebugPackage && isDotnetSDKInstalled)
- ==> "NuGet"
-
-"All"
- ==> "NuGet"
- ==> "CreatePackage"
- ==> "GitHubRelease"
- ==> "PublishNuGet"
- ==> "Release"
-
-"CleanDocs"
- ==> "GenerateDocsJa"
- ==> "GenerateDocs"
- ==> "Release"
-
-RunTargetOrDefault "All"
diff --git a/.paket/Paket.Restore.targets b/fcs/.paket/Paket.Restore.targets
similarity index 100%
rename from .paket/Paket.Restore.targets
rename to fcs/.paket/Paket.Restore.targets
diff --git a/.paket/paket.bootstrapper.exe b/fcs/.paket/paket.bootstrapper.exe
similarity index 100%
rename from .paket/paket.bootstrapper.exe
rename to fcs/.paket/paket.bootstrapper.exe
diff --git a/.paket/paket.targets b/fcs/.paket/paket.targets
similarity index 100%
rename from .paket/paket.targets
rename to fcs/.paket/paket.targets
diff --git a/src/fsharp/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
similarity index 62%
rename from src/fsharp/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
rename to fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
index 7aaaf51efc..deef4f0e68 100644
--- a/src/fsharp/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
+++ b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
@@ -1,15 +1,12 @@
+
+ $(MSBuildProjectDirectory)\..\..\src
+
+
Debug
AnyCPU
@@ -19,26 +16,23 @@
$(NoWarn);44;62;9
{8157b50e-397d-4232-a4e0-1977afc7076d}
true
- v4.5
0x06800000
- $(OtherFlags) /warnon:1182
true
true
$(OtherFlags) --times
$(NoWarn);69;65;54;61;75
true
- ..\..\..\bin\$(TargetFrameworkVersion)
- $(OutputPath)\$(AssemblyName).xml
- $(DefineConstants);CROSS_PLATFORM_COMPILER
- $(DefineConstants);ENABLE_MONO_SUPPORT
- $(DefineConstants);FX_ATLEAST_45
- $(DefineConstants);FX_ATLEAST_40
- $(DefineConstants);FX_MSBUILDRESOLVER_RUNTIMELIKE
- 4.4.0.0
+ ..\..\$(Configuration)\fcs\net45\
false
true
AnyCPU
+ $(DefineConstants);CROSS_PLATFORM_COMPILER
+ $(DefineConstants);ENABLE_MONO_SUPPORT
+ $(OtherFlags) /warnon:1182
+ $(OtherFlags) --version:$(VersionPrefix).0
+
+ v4.5
@@ -50,13 +44,7 @@
true
-
- AssemblyInfo/assemblyinfo.FSharp.Compiler.Service.MSBuild.v12.dll.fs
-
-
- AssemblyInfo/assemblyinfo.shared.fs
-
-
+
Service/MSBuildReferenceResolver.fs
@@ -68,35 +56,37 @@
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Framework.dll
+ false
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Engine.dll
+ false
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.dll
+ false
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Utilities.v12.0.dll
+ false
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Tasks.v12.0.dll
+ false
-
- False
+
+
+ $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll
+ false
+
+
FSharp.Compiler.Service
{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
True
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
-
-
-
+
\ No newline at end of file
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
similarity index 73%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
rename to fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
index 82d7749b27..07625e300e 100644
--- a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
@@ -1,21 +1,28 @@
-
+
+ $(MSBuildProjectDirectory)\..\..\src
+
+
Debug
AnyCPU
$(MSBuildProjectDirectory)\..\..\..\
2.0
893c3cd9-5af8-4027-a667-21e62fc2c703
- Library
FSharp.Compiler.Service.ProjectCracker
FSharp.Compiler.Service.ProjectCracker
- v4.5
- 4.4.0.0
FSharp.Compiler.Service.ProjectCracker
- ..\..\..\bin\$(TargetFrameworkVersion)
- ..\..\..\bin\$(TargetFrameworkVersion)\FSharp.Compiler.Service.ProjectCracker.xml
+ Library
+ ..\..\$(Configuration)\fcs\net45\
+ $(OutputPath)$(AssemblyName).xml
false
+
+ v4.5
+ true
+ AnyCPU
+ 3
+ $(OtherFlags) --version:$(VersionPrefix).0
true
@@ -23,29 +30,25 @@
false
false
DEBUG;TRACE
- 3
- AnyCPU
- true
pdbonly
true
true
TRACE
- 3
- AnyCPU
- true
-
- False
-
+
+
+ $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll
+ false
+
@@ -60,5 +63,5 @@
True
-
+
\ No newline at end of file
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs b/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs
similarity index 97%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs
rename to fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs
index baf8102279..462c749f2d 100644
--- a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs
+++ b/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs
@@ -33,7 +33,7 @@ type ProjectCracker =
logMap := Map.add opts.ProjectFile opts.LogOutput !logMap
{ ProjectFileName = opts.ProjectFile
- ProjectFileNames = sourceFiles
+ SourceFiles = sourceFiles
OtherOptions = otherOptions
ReferencedProjects = referencedProjects
IsIncompleteTypeCheckEnvironment = false
@@ -41,7 +41,8 @@ type ProjectCracker =
LoadTime = loadedTimeStamp
UnresolvedReferences = None
OriginalLoadReferences = []
- ExtraProjectInfo = None }
+ ExtraProjectInfo = None
+ Stamp = None }
#if NETSTANDARD1_6
let arguments = [|
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/App.config b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/App.config
similarity index 100%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/App.config
rename to fcs/FSharp.Compiler.Service.ProjectCrackerTool/App.config
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
similarity index 100%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
rename to fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
similarity index 64%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
rename to fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
index 69c44eb009..bb29e5b736 100644
--- a/src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
@@ -1,6 +1,9 @@
-
+
+ $(MSBuildProjectDirectory)\..\..\src
+
+
Debug
AnyCPU
@@ -8,18 +11,21 @@
2.0
b1bdd96d-47e1-4e65-8107-fbae23a06db4
Exe
+ ..\..\$(Configuration)\fcs\net45\
+ $(OutputPath)$(AssemblyName).xml
FSharp.Compiler.Service.ProjectCrackerTool
FSharp.Compiler.Service.ProjectCrackerTool
- v4.5
- 4.4.0.0
FSharp.Compiler.Service.ProjectCrackerTool
$(OtherFlags) --staticlink:FSharp.Core
- $(NoWarn);40
+ $(NoWarn);40;44;2011
true
- FSharp.Compiler.Service.ProjectCrackerTool
- $(SolutionDir)bin\$(TargetFrameworkVersion)
- $(SolutionDir)bin\$(TargetFrameworkVersion)\FSharp.Compiler.Service.ProjectCrackerTool.xml
false
+
+ v4.5
+ 3
+ AnyCPU
+ true
+ $(OtherFlags) --version:$(VersionPrefix).0
true
@@ -27,23 +33,13 @@
false
false
DEBUG;TRACE
- 3
- AnyCPU
- true
pdbonly
true
true
TRACE
- 3
- AnyCPU
- true
-
- 11
-
-
@@ -53,23 +49,20 @@
- True
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Framework.dll
+ false
- True
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Engine.dll
+ false
- True
- True
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v14.0/Microsoft.Build.dll
+ false
- True
-
-
-
- False
+ $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Utilities.v12.0.dll
+ false
@@ -78,12 +71,13 @@
+
+
+
+ $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll
+ false
+
+
-
+
\ No newline at end of file
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs
similarity index 100%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs
rename to fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerOptions.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerOptions.fs
similarity index 100%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerOptions.fs
rename to fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerOptions.fs
diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs
similarity index 100%
rename from src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs
rename to fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs
diff --git a/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj b/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj
new file mode 100644
index 0000000000..058a83e551
--- /dev/null
+++ b/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj
@@ -0,0 +1,59 @@
+
+
+ netcoreapp1.0
+ $(DefineConstants);DOTNETCORE;FX_ATLEAST_45;FX_ATLEAST_PORTABLE;FX_NO_RUNTIMEENVIRONMENT;FX_RESHAPED_REFLECTION;TODO_REWORK_ASSEMBLY_LOAD;
+ $(NoWarn);44;
+ true
+ true
+ true
+ false
+
+
+
+ ReshapedReflection.fs
+
+
+ FsUnit.fs
+
+
+ Common.fs
+
+
+ EditorTests.fs
+
+
+ ExprTests.fs
+
+
+ TokenizerTests.fs
+
+
+ PerfTests.fs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/FscExe/App.config b/fcs/FSharp.Compiler.Service.Tests/App.config
similarity index 86%
rename from samples/FscExe/App.config
rename to fcs/FSharp.Compiler.Service.Tests/App.config
index 76e86b6d2a..76cc57718b 100644
--- a/samples/FscExe/App.config
+++ b/fcs/FSharp.Compiler.Service.Tests/App.config
@@ -5,7 +5,7 @@
-
+
diff --git a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
new file mode 100644
index 0000000000..95498ca69c
--- /dev/null
+++ b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
@@ -0,0 +1,133 @@
+
+
+
+ $(MSBuildProjectDirectory)\..\..\src
+
+
+
+ Debug
+ AnyCPU
+ $(MSBuildProjectDirectory)\..\..\..\
+ 2.0
+ EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F
+ Library
+ FSharp
+ FSharp.Compiler.Service.Tests
+ FSharp.Compiler.Service.Tests
+ LIBRARY
+ 58;75
+ v4.6
+ EXTENSIONTYPING;$(DefineConstants)
+ false
+ ..\..\$(Configuration)\fcs\net45\
+ true
+ 3
+ true
+
+
+ true
+ full
+ false
+ AnyCPU
+ true
+
+
+ pdbonly
+ true
+ AnyCPU
+ true
+
+
+
+ FsUnit.fs
+
+
+ Common.fs
+
+
+ EditorTests.fs
+
+
+ FileSystemTests.fs
+
+
+ ProjectAnalysisTests.fs
+
+
+ MultiProjectAnalysisTests.fs
+
+
+ PerfTests.fs
+
+
+ InteractiveCheckerTests.fs
+
+
+ ExprTests.fs
+
+
+ CSharpProjectAnalysis.fs
+
+
+ ProjectOptionsTests.fs
+
+
+ FSharp.Core.optdata
+ PreserveNewest
+
+
+ FSharp.Core.sigdata
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
+ True
+
+
+ True
+ ..\..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll
+
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools\FSharp.Core.dll
+ true
+
+
+
+ CSharp_Analysis
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}
+ True
+
+
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}
+ FSharp.Compiler.Service
+ True
+
+
+ FSharp.Compiler.Service.ProjectCracker
+ {893c3cd9-5af8-4027-a667-21e62fc2c703}
+ True
+
+
+
+
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.netstandard.sln b/fcs/FSharp.Compiler.Service.netstandard.sln
new file mode 100644
index 0000000000..5cb21d4663
--- /dev/null
+++ b/fcs/FSharp.Compiler.Service.netstandard.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.8
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.netstandard", "FSharp.Compiler.Service.netstandard\FSharp.Compiler.Service.netstandard.fsproj", "{36B9F520-14B1-4431-AAF2-75433B87D851}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.Compiler.Service.Tests.netcore", "FSharp.Compiler.Service.Tests.netcore\FSharp.Compiler.Service.Tests.netcore.fsproj", "{1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x64.ActiveCfg = Debug|x64
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x64.Build.0 = Debug|x64
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x86.ActiveCfg = Debug|x86
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x86.Build.0 = Debug|x86
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|Any CPU.Build.0 = Release|Any CPU
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x64.ActiveCfg = Release|x64
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x64.Build.0 = Release|x64
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x86.ActiveCfg = Release|x86
+ {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x86.Build.0 = Release|x86
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x64.ActiveCfg = Debug|x64
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x64.Build.0 = Debug|x64
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x86.ActiveCfg = Debug|x86
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x86.Build.0 = Debug|x86
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x64.ActiveCfg = Release|x64
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x64.Build.0 = Release|x64
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x86.ActiveCfg = Release|x86
+ {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {DEDB1900-EFFF-4691-89B1-6DBEE6B77491}
+ EndGlobalSection
+EndGlobal
diff --git a/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.netcore.fsproj b/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj
old mode 100755
new mode 100644
similarity index 50%
rename from src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.netcore.fsproj
rename to fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj
index aa7082abd1..eb20755c31
--- a/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.netcore.fsproj
+++ b/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj
@@ -1,10 +1,14 @@
-
+
+
+ $(MSBuildProjectDirectory)\..\..\src
+
+
- 13.0.0
netstandard1.6
FSharp.Compiler.Service
$(DefineConstants);BUILDING_WITH_LKG
- $(DefineConstants);COMPILED_AS_LANGUAGE_SERVICE_DLL
+ $(DefineConstants);COMPILER_PUBLIC_API
+ $(DefineConstants);COMPILER_SERVICE_AS_DLL
$(DefineConstants);COMPILER
$(DefineConstants);COMPILER_SERVICE
$(DefineConstants);COMPILER_SERVICE_ASSUMES_FSHARP_CORE_4_4_0_0
@@ -41,6 +45,7 @@
$(DefineConstants);FX_NO_WEB_CLIENT
$(DefineConstants);FX_NO_WINFORMS
$(DefineConstants);FX_NO_WIN_REGISTRY
+ $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER
$(DefineConstants);FX_REDUCED_CONSOLE
$(DefineConstants);FX_REDUCED_EXCEPTIONS
$(DefineConstants);FX_RESHAPED_CONSOLE
@@ -55,7 +60,7 @@
$(DefineConstants);NO_INLINE_IL_PARSER
$(DefineConstants);NO_LOADER_OPTIMIZATION
$(DefineConstants);NO_LOGGING_GUI
- $(DefineConstants);RESHAPED_MSBUILD
+ $(DefineConstants);FX_RESHAPED_MSBUILD
$(DefineConstants);SIGNED
$(DefineConstants);STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
$(DefineConstants);TODO_REWORK_ASSEMBLY_LOAD
@@ -64,178 +69,179 @@
true
true
true
-
- false
-
+
AssemblyInfo/assemblyinfo.FSharp.Compiler.Service.dll.fs
-
- AssemblyInfo/assemblyinfo.shared.fs
-
-
- FSComp.resx
-
-
+
+ FSComp.txt
+
+
+ FSIstrings.txt
+
+
FSStrings.resx
-
- FSIstrings.resx
-
-
-
-
+
+ --module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser --open Microsoft.FSharp.Compiler.AbstractIL --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing
+ ilpars.fsy
+
+
+ --module Microsoft.FSharp.Compiler.Parser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing
+ pars.fsy
+
+
Reshaped/reshapedreflection.fs
-
+
ErrorText/sformat.fsi
-
+
ErrorText/sformat.fs
-
+
ErrorText/sr.fsi
-
+
ErrorText/sr.fs
-
+
LexYaccRuntime/prim-lexing.fsi
-
+
LexYaccRuntime/prim-lexing.fs
-
+
LexYaccRuntime/prim-parsing.fsi
-
+
LexYaccRuntime/prim-parsing.fs
-
+
Utilities/ResizeArray.fsi
-
+
Utilities/ResizeArray.fs
-
+
Utilities/HashMultiMap.fsi
-
+
Utilities/HashMultiMap.fs
-
+
Utilities/EditDistance.fs
-
+
Utilities/TaggedCollections.fsi
-
+
Utilities/TaggedCollections.fs
-
+
Utilities/QueueList.fs
-
+
Utilities/ildiag.fsi
-
+
Utilities/ildiag.fs
-
+
Utilities/illib.fs
-
+
Utilities/filename.fsi
-
+
Utilities/filename.fs
-
+
Utilities/zmap.fsi
-
+
Utilities/zmap.fs
-
+
Utilities/zset.fsi
-
+
Utilities/zset.fs
-
+
Utilities/bytes.fsi
-
+
Utilities/bytes.fs
-
+
Utilities/lib.fs
-
+
Utilities/InternalCollections.fsi
-
+
Utilities/InternalCollections.fs
-
+
Utilities/rational.fsi
-
+
Utilities/rational.fs
-
+
ErrorLogging/range.fsi
-
+
ErrorLogging/range.fs
-
+
ErrorLogging/ErrorLogger.fs
-
+
ErrorLogging/ErrorResolutionHints.fs
-
+
ReferenceResolution/ReferenceResolver.fs
-
+
AbsIL/il.fsi
-
+
AbsIL/il.fs
-
+
AbsIL/ilx.fsi
-
+
AbsIL/ilx.fs
-
+
AbsIL/ilascii.fsi
-
+
AbsIL/ilascii.fs
-
+
AbsIL/ilprint.fsi
-
+
AbsIL/ilprint.fs
-
+
AbsIL/ilmorph.fsi
-
+
AbsIL/ilmorph.fs
-
+
AbsIL/ilsign.fs
-
+
AbsIL/ilsupp.fsi
-
+
AbsIL/ilsupp.fs
@@ -244,67 +250,83 @@
AbsIL/illex.fs
-
+
AbsIL/ilbinary.fsi
-
+
AbsIL/ilbinary.fs
-
+
AbsIL/ilread.fsi
-
+
AbsIL/ilread.fs
-
+
AbsIL/ilwritepdb.fsi
-
+
AbsIL/ilwritepdb.fs
-
+
AbsIL/ilwrite.fsi
-
+
AbsIL/ilwrite.fs
-
+
AbsIL/ilreflect.fs
-
+
CompilerLocation/CompilerLocationUtils.fs
-
+
PrettyNaming/PrettyNaming.fs
-
+
ILXErase/ilxsettings.fs
-
+
ILXErase/EraseClosures.fsi
-
+
ILXErase/EraseClosures.fs
-
+
ILXErase/EraseUnions.fsi
-
+
ILXErase/EraseUnions.fs
-
+
+ --unicode --lexlib Internal.Utilities.Text.Lexing
+ AbsIL/illex.fsl
+
+
+ --unicode --lexlib Internal.Utilities.Text.Lexing
+ ParserAndUntypedAST/lex.fsl
+
+
+ --unicode --lexlib Internal.Utilities.Text.Lexing
+ ParserAndUntypedAST/pplex.fsl
+
+
+ --module Microsoft.FSharp.Compiler.PPParser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing
+ ParserAndUntypedAST/pppars.fsy
+
+
ParserAndUntypedAST/UnicodeLexing.fsi
-
+
ParserAndUntypedAST/UnicodeLexing.fs
-
+
ParserAndUntypedAST/layout.fsi
-
+
ParserAndUntypedAST/layout.fs
-
+
ParserAndUntypedAST/ast.fs
@@ -313,10 +335,10 @@
ParserAndUntypedAST/pars.fs
-
+
ParserAndUntypedAST/lexhelp.fsi
-
+
ParserAndUntypedAST/lexhelp.fs
@@ -325,273 +347,291 @@
ParserAndUntypedAST/lex.fs
-
+
ParserAndUntypedAST/LexFilter.fs
-
+
TypedAST/tainted.fsi
-
+
TypedAST/tainted.fs
-
+
TypedAST/ExtensionTyping.fsi
-
+
TypedAST/ExtensionTyping.fs
-
+
TypedAST/QuotationPickler.fsi
-
+
TypedAST/QuotationPickler.fs
-
+
TypedAST/tast.fs
-
+
TypedAST/TcGlobals.fs
-
+
TypedAST/TastOps.fsi
-
+
TypedAST/TastOps.fs
-
+
TypedAST/TastPickle.fsi
-
+
TypedAST/TastPickle.fs
-
+
Logic/import.fsi
-
+
Logic/import.fs
-
+
Logic/infos.fs
-
+
Logic/AccessibilityLogic.fs
-
+
Logic/AttributeChecking.fs
-
+
Logic/InfoReader.fs
-
+
Logic/NicePrint.fs
-
+
Logic/AugmentWithHashCompare.fsi
-
+
Logic/AugmentWithHashCompare.fs
-
+
Logic/NameResolution.fsi
-
+
Logic/NameResolution.fs
-
+
Logic/TypeRelations.fs
-
+
Logic/SignatureConformance.fs
-
+
Logic/MethodOverrides.fs
-
+
Logic/MethodCalls.fs
-
+
Logic/PatternMatchCompilation.fsi
-
+
Logic/PatternMatchCompilation.fs
-
+
Logic/ConstraintSolver.fsi
-
+
Logic/ConstraintSolver.fs
-
+
Logic/CheckFormatStrings.fsi
-
+
Logic/CheckFormatStrings.fs
-
+
Logic/FindUnsolved.fs
-
+
Logic/QuotationTranslator.fsi
-
+
Logic/QuotationTranslator.fs
-
+
Logic/PostInferenceChecks.fsi
-
+
Logic/PostInferenceChecks.fs
-
+
Logic/TypeChecker.fsi
-
+
Logic/TypeChecker.fs
-
+
Optimize/Optimizer.fsi
-
+
Optimize/Optimizer.fs
-
+
Optimize/DetupleArgs.fsi
-
+
Optimize/DetupleArgs.fs
-
+
Optimize/InnerLambdasToTopLevelFuncs.fsi
-
+
Optimize/InnerLambdasToTopLevelFuncs.fs
-
+
Optimize/LowerCallsAndSeqs.fs
-
+
Optimize/autobox.fs
-
+
CodeGen/IlxGen.fsi
-
+
CodeGen/IlxGen.fs
-
+
Driver/CompileOps.fsi
-
+
Driver/CompileOps.fs
-
+
Driver/CompileOptions.fsi
-
+
Driver/CompileOptions.fs
-
+
Driver/fsc.fsi
-
+
Driver/fsc.fs
-
- Service/IncrementalBuild.fsi
+
+ Symbols/SymbolHelpers.fsi
-
- Service/IncrementalBuild.fs
+
+ Symbols/SymbolHelpers.fs
-
- Service/Reactor.fsi
+
+ Symbols/Symbols.fsi
-
- Service/Reactor.fs
+
+ Symbols/Symbols.fs
-
- Service/ServiceConstants.fs
+
+ Symbols/Exprs.fsi
-
- Service/ServiceDeclarations.fsi
+
+ Symbols/Exprs.fs
-
- Service/ServiceDeclarations.fs
+
+ Service/IncrementalBuild.fsi
-
- Service/Symbols.fsi
+
+ Service/IncrementalBuild.fs
-
- Service/Symbols.fs
+
+ Service/Reactor.fsi
-
- Service/Exprs.fsi
+
+ Service/Reactor.fs
-
- Service/Exprs.fs
+
+ Service/ServiceConstants.fs
-
+
Service/ServiceLexing.fsi
-
+
Service/ServiceLexing.fs
-
+
Service/ServiceParseTreeWalk.fs
-
+
Service/ServiceNavigation.fsi
-
+
Service/ServiceNavigation.fs
-
+
Service/ServiceParamInfoLocations.fsi
-
+
Service/ServiceParamInfoLocations.fs
-
+
Service/ServiceUntypedParse.fsi
-
+
Service/ServiceUntypedParse.fs
-
+
Service/reshapedmsbuild.fs
-
+
Service/SimulatedMSBuildReferenceResolver.fs
-
+
+ Service/ServiceDeclarationLists.fsi
+
+
+ Service/ServiceDeclarationLists.fs
+
+
Service/ServiceAssemblyContent.fsi
-
+
Service/ServiceAssemblyContent.fs
-
+
+ Service/ServiceXmlDocParser.fsi
+
+
+ Service/ServiceXmlDocParser.fs
+
+
+ Service/ExternalSymbol.fsi
+
+
+ Service/ExternalSymbol.fs
+
+
Service/service.fsi
-
+
Service/service.fs
-
- Service/SimpleServices.fsi
+
+ Service/ServiceInterfaceStubGenerator.fsi
+
+
+ Service/ServiceInterfaceStubGenerator.fs
+
+
+ Service/ServiceStructure.fsi
-
- Service/SimpleServices.fs
+
+ Service/ServiceStructure.fs
-
+
Service/fsi.fsi
-
+
Service/fsi.fs
-
-
-
-
-
-
@@ -603,7 +643,8 @@
-
-
+
+
+
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.sln b/fcs/FSharp.Compiler.Service.sln
new file mode 100644
index 0000000000..e1be709379
--- /dev/null
+++ b/fcs/FSharp.Compiler.Service.sln
@@ -0,0 +1,151 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.8
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{B6B68AE6-E7A4-4D43-9B34-FFA74BFE192B}"
+ ProjectSection(SolutionItems) = preProject
+ build.cmd = build.cmd
+ build.fsx = build.fsx
+ build.sh = build.sh
+ nuget\FSharp.Compiler.Service.nuspec = nuget\FSharp.Compiler.Service.nuspec
+ paket.dependencies = paket.dependencies
+ README.md = README.md
+ RELEASE_NOTES.md = RELEASE_NOTES.md
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docsrc", "docsrc", "{83FEE492-6701-4E59-9184-16B1D30E91F8}"
+ ProjectSection(SolutionItems) = preProject
+ docsrc\content\caches.fsx = docsrc\content\caches.fsx
+ docsrc\content\corelib.fsx = docsrc\content\corelib.fsx
+ docsrc\content\devnotes.md = docsrc\content\devnotes.md
+ docsrc\content\editor.fsx = docsrc\content\editor.fsx
+ docsrc\content\filesystem.fsx = docsrc\content\filesystem.fsx
+ docsrc\content\fsharp-readme.md = docsrc\content\fsharp-readme.md
+ docsrc\content\index.md = docsrc\content\index.md
+ docsrc\content\interactive.fsx = docsrc\content\interactive.fsx
+ docsrc\content\project.fsx = docsrc\content\project.fsx
+ docsrc\content\queue.fsx = docsrc\content\queue.fsx
+ docsrc\content\symbols.fsx = docsrc\content\symbols.fsx
+ docsrc\content\tokenizer.fsx = docsrc\content\tokenizer.fsx
+ docsrc\content\typedtree.fsx = docsrc\content\typedtree.fsx
+ docsrc\content\untypedtree.fsx = docsrc\content\untypedtree.fsx
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0554567F-1DCB-46A5-9EF2-E1938A3D4F14}"
+ ProjectSection(SolutionItems) = preProject
+ docsrc\tools\generate.fsx = docsrc\tools\generate.fsx
+ docsrc\tools\templates\template.cshtml = docsrc\tools\templates\template.cshtml
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E396742E-B4E5-4584-A9E4-CC1A491F5BC1}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "EditorService", "samples\EditorService\EditorService.fsproj", "{A40507D6-FA48-43D3-B18A-AE3DAACE4020}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "InteractiveService", "samples\InteractiveService\InteractiveService.fsproj", "{067E95E5-E3DC-4CA7-813A-4D1E277D2D52}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tokenizer", "samples\Tokenizer\Tokenizer.fsproj", "{92793069-816F-4F69-84AC-0966F8275E65}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "samples\UntypedTree\UntypedTree.fsproj", "{C816728D-BBEA-472D-9F6C-E8913957A673}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCrackerTool", "FSharp.Compiler.Service.ProjectCrackerTool\FSharp.Compiler.Service.ProjectCrackerTool.fsproj", "{B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCracker", "FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj", "{893C3CD9-5AF8-4027-A667-21E62FC2C703}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{098D1C35-D0FB-4720-83DD-8002293EA237}"
+ ProjectSection(SolutionItems) = preProject
+ .gitattributes = .gitattributes
+ .gitignore = .gitignore
+ .travis.yml = .travis.yml
+ appveyor.yml = appveyor.yml
+ NuGet.Config = NuGet.Config
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{9020E136-794A-473F-9B1B-9623C97B7161}"
+ ProjectSection(SolutionItems) = preProject
+ nuget\FSharp.Compiler.Service.template = nuget\FSharp.Compiler.Service.template
+ nuget\projectcracker.template = nuget\projectcracker.template
+ EndProjectSection
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.MSBuild.v12", "FSharp.Compiler.Service.MSBuild.v12\FSharp.Compiler.Service.MSBuild.v12.fsproj", "{8157B50E-397D-4232-A4E0-1977AFC7076D}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service", "FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.Tests", "FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Any CPU.Build.0 = Release|Any CPU
+ {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Any CPU.Build.0 = Release|Any CPU
+ {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {92793069-816F-4F69-84AC-0966F8275E65}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {92793069-816F-4F69-84AC-0966F8275E65}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0 = Release|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {893C3CD9-5AF8-4027-A667-21E62FC2C703}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {0554567F-1DCB-46A5-9EF2-E1938A3D4F14} = {83FEE492-6701-4E59-9184-16B1D30E91F8}
+ {A40507D6-FA48-43D3-B18A-AE3DAACE4020} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
+ {067E95E5-E3DC-4CA7-813A-4D1E277D2D52} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
+ {92793069-816F-4F69-84AC-0966F8275E65} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
+ {C816728D-BBEA-472D-9F6C-E8913957A673} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
+ {F9540CA8-1CE0-4546-A23A-A461E416E95B} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {9E9BAC7B-3834-497C-B7AC-6B7988778D1A}
+ EndGlobalSection
+EndGlobal
diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
new file mode 100644
index 0000000000..915e1945a0
--- /dev/null
+++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
@@ -0,0 +1,645 @@
+
+
+
+
+
+ $(MSBuildProjectDirectory)\..\..\src
+
+
+
+ Debug
+ AnyCPU
+ $(MSBuildProjectDirectory)\..\..\
+ Library
+ FSharp.Compiler.Service
+ $(NoWarn);44;62;9
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}
+ true
+ 0x06800000
+ true
+ $(NoWarn);69;65;54;61;75
+ true
+ ..\..\$(Configuration)\fcs\net45\
+ $(OutputPath)$(AssemblyName).xml
+
+ v4.5
+
+ $(DefineConstants);EXTENSIONTYPING
+ $(DefineConstants);CROSS_PLATFORM_COMPILER
+ $(DefineConstants);ENABLE_MONO_SUPPORT
+ $(DefineConstants);COMPILER
+ $(DefineConstants);COMPILER_SERVICE_AS_DLL
+ $(DefineConstants);COMPILER_PUBLIC_API
+ $(DefineConstants);NO_STRONG_NAMES
+ $(OtherFlags) /warnon:1182
+ $(OtherFlags) --times
+ $(OtherFlags) --version:$(VersionPrefix).0
+ false
+ true
+
+
+
+ true
+ full
+ false
+ AnyCPU
+
+
+ pdbonly
+ true
+ AnyCPU
+
+
+
+ AssemblyInfo/assemblyinfo.FSharp.Compiler.Service.dll.fs
+
+
+ FSComp.txt
+
+
+ FSIstrings.txt
+
+
+ FSStrings.resx
+
+
+ --module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser --open Microsoft.FSharp.Compiler.AbstractIL --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing
+ ilpars.fsy
+
+
+ --module Microsoft.FSharp.Compiler.Parser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing
+ pars.fsy
+
+
+ Reshaped/reshapedreflection.fs
+
+
+ ErrorText/sformat.fsi
+
+
+ ErrorText/sformat.fs
+
+
+ ErrorText/sr.fsi
+
+
+ ErrorText/sr.fs
+
+
+ LexYaccRuntime/prim-lexing.fsi
+
+
+ LexYaccRuntime/prim-lexing.fs
+
+
+ LexYaccRuntime/prim-parsing.fsi
+
+
+ LexYaccRuntime/prim-parsing.fs
+
+
+ Utilities\ResizeArray.fsi
+
+
+ Utilities\ResizeArray.fs
+
+
+ Utilities/HashMultiMap.fsi
+
+
+ Utilities/HashMultiMap.fs
+
+
+ Utilities\EditDistance.fs
+
+
+ Utilities/TaggedCollections.fsi
+
+
+ Utilities/TaggedCollections.fs
+
+
+ Utilities/QueueList.fs
+
+
+ Utilities/ildiag.fsi
+
+
+ Utilities/ildiag.fs
+
+
+ Utilities/illib.fs
+
+
+ Utilities/filename.fsi
+
+
+ Utilities/filename.fs
+
+
+ Utilities/zmap.fsi
+
+
+ Utilities/zmap.fs
+
+
+ Utilities/zset.fsi
+
+
+ Utilities/zset.fs
+
+
+ Utilities/bytes.fsi
+
+
+ Utilities/bytes.fs
+
+
+ Utilities/lib.fs
+
+
+ Utilities/InternalCollections.fsi
+
+
+ Utilities/InternalCollections.fs
+
+
+ Utilities/rational.fsi
+
+
+ Utilities/rational.fs
+
+
+ ErrorLogging/range.fsi
+
+
+ ErrorLogging/range.fs
+
+
+ ErrorLogging/ErrorLogger.fs
+
+
+ ErrorLogging/ErrorResolutionHints.fs
+
+
+ ReferenceResolution/ReferenceResolver.fs
+
+
+ --unicode --lexlib Internal.Utilities.Text.Lexing
+ AbsIL/illex.fsl
+
+
+ AbsIL/il.fsi
+
+
+ AbsIL/il.fs
+
+
+ AbsIL/ilx.fsi
+
+
+ AbsIL/ilx.fs
+
+
+ AbsIL/ilascii.fsi
+
+
+ AbsIL/ilascii.fs
+
+
+ AbsIL/ilprint.fsi
+
+
+ AbsIL/ilprint.fs
+
+
+ AbsIL/ilmorph.fsi
+
+
+ AbsIL/ilmorph.fs
+
+
+ AbsIL/ilsupp.fsi
+
+
+ AbsIL/ilsupp.fs
+
+
+ AbsIL/ilpars.fs
+
+
+ AbsIL/illex.fs
+
+
+ AbsIL/ilbinary.fsi
+
+
+ AbsIL/ilbinary.fs
+
+
+ AbsIL/ilread.fsi
+
+
+ AbsIL/ilread.fs
+
+
+ AbsIL/ilwritepdb.fsi
+
+
+ AbsIL/ilwritepdb.fs
+
+
+ AbsIL/ilwrite.fsi
+
+
+ AbsIL/ilwrite.fs
+
+
+ AbsIL/ilreflect.fs
+
+
+ CompilerLocation/CompilerLocationUtils.fs
+
+
+ PrettyNaming/PrettyNaming.fs
+
+
+ ILXErase/ilxsettings.fs
+
+
+ ILXErase/EraseClosures.fsi
+
+
+ ILXErase/EraseClosures.fs
+
+
+ ILXErase/EraseUnions.fsi
+
+
+ ILXErase/EraseUnions.fs
+
+
+ --unicode --lexlib Internal.Utilities.Text.Lexing
+ ParserAndUntypedAST/lex.fsl
+
+
+ --unicode --lexlib Internal.Utilities.Text.Lexing
+ ParserAndUntypedAST/pplex.fsl
+
+
+ --module Microsoft.FSharp.Compiler.PPParser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing
+ ParserAndUntypedAST/pppars.fsy
+
+
+ ParserAndUntypedAST/UnicodeLexing.fsi
+
+
+ ParserAndUntypedAST/UnicodeLexing.fs
+
+
+ ParserAndUntypedAST/layout.fsi
+
+
+ ParserAndUntypedAST/layout.fs
+
+
+ ParserAndUntypedAST/ast.fs
+
+
+ ParserAndUntypedAST/pppars.fs
+
+
+ ParserAndUntypedAST/pars.fs
+
+
+ ParserAndUntypedAST/lexhelp.fsi
+
+
+ ParserAndUntypedAST/lexhelp.fs
+
+
+ ParserAndUntypedAST/pplex.fs
+
+
+ ParserAndUntypedAST/lex.fs
+
+
+ ParserAndUntypedAST/LexFilter.fs
+
+
+ TypedAST/tainted.fsi
+
+
+ TypedAST/tainted.fs
+
+
+ TypedAST/ExtensionTyping.fsi
+
+
+ TypedAST/ExtensionTyping.fs
+
+
+ TypedAST/QuotationPickler.fsi
+
+
+ TypedAST/QuotationPickler.fs
+
+
+ TypedAST/tast.fs
+
+
+ TypedAST/TcGlobals.fs
+
+
+ TypedAST/TastOps.fsi
+
+
+ TypedAST/TastOps.fs
+
+
+ TypedAST/TastPickle.fsi
+
+
+ TypedAST/TastPickle.fs
+
+
+ Logic/import.fsi
+
+
+ Logic/import.fs
+
+
+ Logic/infos.fs
+
+
+ Logic/AccessibilityLogic.fs
+
+
+ Logic/AttributeChecking.fs
+
+
+ Logic/InfoReader.fs
+
+
+ Logic/NicePrint.fs
+
+
+ Logic/AugmentWithHashCompare.fsi
+
+
+ Logic/AugmentWithHashCompare.fs
+
+
+ Logic/NameResolution.fsi
+
+
+ Logic/NameResolution.fs
+
+
+ Logic/TypeRelations.fs
+
+
+ Logic/SignatureConformance.fs
+
+
+ Logic/MethodOverrides.fs
+
+
+ Logic/MethodCalls.fs
+
+
+ Logic/PatternMatchCompilation.fsi
+
+
+ Logic/PatternMatchCompilation.fs
+
+
+ Logic/ConstraintSolver.fsi
+
+
+ Logic/ConstraintSolver.fs
+
+
+ Logic/CheckFormatStrings.fsi
+
+
+ Logic/CheckFormatStrings.fs
+
+
+ Logic/FindUnsolved.fs
+
+
+ Logic/QuotationTranslator.fsi
+
+
+ Logic/QuotationTranslator.fs
+
+
+ Logic/PostInferenceChecks.fsi
+
+
+ Logic/PostInferenceChecks.fs
+
+
+ Logic/TypeChecker.fsi
+
+
+ Logic/TypeChecker.fs
+
+
+ Optimize/Optimizer.fsi
+
+
+ Optimize/Optimizer.fs
+
+
+ Optimize/DetupleArgs.fsi
+
+
+ Optimize/DetupleArgs.fs
+
+
+ Optimize/InnerLambdasToTopLevelFuncs.fsi
+
+
+ Optimize/InnerLambdasToTopLevelFuncs.fs
+
+
+ Optimize/LowerCallsAndSeqs.fs
+
+
+ Optimize\autobox.fs
+
+
+ CodeGen/IlxGen.fsi
+
+
+ CodeGen/IlxGen.fs
+
+
+ Driver/CompileOps.fsi
+
+
+ Driver/CompileOps.fs
+
+
+ Driver/CompileOptions.fsi
+
+
+ Driver/CompileOptions.fs
+
+
+ Driver/fsc.fsi
+
+
+ Driver/fsc.fs
+
+
+ Symbols/SymbolHelpers.fsi
+
+
+ Symbols/SymbolHelpers.fs
+
+
+ Symbols/Symbols.fsi
+
+
+ Symbols/Symbols.fs
+
+
+ Symbols/Exprs.fsi
+
+
+ Symbols/Exprs.fs
+
+
+ Service/IncrementalBuild.fsi
+
+
+ Service/IncrementalBuild.fs
+
+
+ Service/Reactor.fsi
+
+
+ Service/Reactor.fs
+
+
+ Service/ServiceConstants.fs
+
+
+ Service/ServiceLexing.fsi
+
+
+ Service/ServiceLexing.fs
+
+
+ Service/ServiceParseTreeWalk.fs
+
+
+ Service/ServiceNavigation.fsi
+
+
+ Service/ServiceNavigation.fs
+
+
+ Service/ServiceParamInfoLocations.fsi
+
+
+ Service/ServiceParamInfoLocations.fs
+
+
+ Service/ServiceUntypedParse.fsi
+
+
+ Service/ServiceUntypedParse.fs
+
+
+ Service/reshapedmsbuild.fs
+
+
+ Service/SimulatedMSBuildReferenceResolver.fs
+
+
+ Service/ServiceDeclarationLists.fsi
+
+
+ Service/ServiceDeclarationLists.fs
+
+
+ Service/ServiceAssemblyContent.fsi
+
+
+ Service/ServiceAssemblyContent.fs
+
+
+ Service/ServiceXmlDocParser.fsi
+
+
+ Service/ServiceXmlDocParser.fs
+
+
+ Service/ExternalSymbol.fsi
+
+
+ Service/ExternalSymbol.fs
+
+
+ Service/service.fsi
+
+
+ Service/service.fs
+
+
+ Service/ServiceInterfaceStubGenerator.fsi
+
+
+ Service/ServiceInterfaceStubGenerator.fs
+
+
+ Service/ServiceStructure.fsi
+
+
+ Service/ServiceStructure.fs
+
+
+ Service/fsi.fsi
+
+
+ Service/fsi.fs
+
+
+
+
+
+
+
+
+
+
+ $(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll
+
+
+ $(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll
+
+
+ $(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll
+
+
+ $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
+
+
+ $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
+
+
+
+
+ $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll
+ false
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fcs/README.md b/fcs/README.md
new file mode 100644
index 0000000000..cb2d32dbf8
--- /dev/null
+++ b/fcs/README.md
@@ -0,0 +1,105 @@
+
+
+# The FSharp.Compiler.Service components and nuget package
+
+This directory contains the build, packaging, test and documentation-generation logic for the nuget package ``FSharp.Compiler.Service``. The source for this nuget
+package is in ``..\src``.
+
+Basically we are packaging up the compiler as a DLL and publishing it as a nuget package.
+
+## FSharp.Compiler.Service v. FSharp.Compiler.Private
+
+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 has a Nuget package
+- FCS has a .NET Standard 1.6 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
+
+
+## Version Numbers
+
+FCS uses its own version number sequence for assemblies and packages, approximately following SemVer rules.
+To update the version number a global replace through fcs\... is currently needed, e.g.
+
+ fcs.props
+ nuget/FSharp.Compiler.Service.nuspec
+ nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec
+ nuget/FSharp.Compiler.Service.ProjectCracker.nuspec
+ RELEASE_NOTES.md
+
+## Building, Testing, Packaging, Releases
+
+To build the package use any of:
+
+ fcs\build Build.NetFx
+ fcs\build Test.NetFx
+ fcs\build NuGet.NetFx
+
+ fcs\build Build.NetStd
+ fcs\build Test.NetStd
+ fcs\build NuGet.NetStd
+
+ fcs\build Build
+ fcs\build Test
+ fcs\build NuGet
+ fcs\build Release
+
+which does things like:
+
+ cd fcs
+ .paket\paket.bootstrapper.exe
+ .paket\paket.exe restore
+ dotnet restore tools.proj
+ packages\FAKE\tools\FAKE.exe build.fsx WhateverTarget
+
+### Manual push of packages
+
+Yu can push the packages if you have permissions, either automatically using ``build Release`` or manually
+
+ set APIKEY=...
+ .nuget\nuget.exe push Release\FSharp.Compiler.Service.14.0.2.nupkg %APIKEY% -Source https://nuget.org
+ .nuget\nuget.exe push Release\FSharp.Compiler.Service.MSBuild.v12.14.0.2.nupkg %APIKEY% -Source https://nuget.org
+ .nuget\nuget.exe push Release\FSharp.Compiler.Service.ProjectCracker.14.0.2.nupkg %APIKEY% -Source https://nuget.org
+
+
+### Use of Paket and FAKE
+
+Paket is only used to get fake and formating tools. Eventually we will likely remove this once we update the project files to .NET SDK 2.0.
+
+FAKE is only used to run build.fsx. Eventually we will likely remove this once we update the project files to .NET SDK 2.0.
+
+### Testing
+
+Testing reuses the test files from ..\tests\service which were are also FCS tests.
+
+
+### Documentation Generation
+
+ fcs\build GenerateDocs
+
+Output is in ``docs``. In the ``FSharp.Compiler.Service`` repo this is checked in and hosted as http://fsharp.github.io/FSharp.Compiler.Service.
+
+
+## The two other nuget packages
+
+It also contains both the source, build, packaging and test logic for
+
+* ``FSharp.Compiler.Service.MSBuild.v12`` adds legacy MSBuild v12 support to an instance of FSharp.Compiler.Service, if exact compatibility for scripting references such as ``#r "Foo, Version=1.3.4"`` is required.
+
+* ``FSharp.Compiler.Service.ProjectCracker`` is part of ``FsAutoComplete`` and Ionide and is used to crack old-style project formats using MSBuild. It used to be part of the FCS API.
+
+Both of these components are gradually becoming obsolete
+
+## Engineering road map
+
+FSharp.Compiler.Service is a somewhat awkward component. There are some things we can do to simplify things:
+
+1. Remove the use of Paket and FAKE
+1. Move all projects under fcs\... to new .NET SDK project file format
+1. Drop the use of ``dotnet mergenupkg`` since we should be able to use cross targeting
+1. Make FCS a DLL similar ot the rest of the build and make this an official component from Microsoft (signed etc.)
+1. Replace FSharp.Compiler.Private by FSharp.Compiler.Service
+
diff --git a/fcs/RELEASE_NOTES.md b/fcs/RELEASE_NOTES.md
new file mode 100644
index 0000000000..18f26ff87e
--- /dev/null
+++ b/fcs/RELEASE_NOTES.md
@@ -0,0 +1,587 @@
+#### 14.0.2
+ * Fix non-public API in .NET Standard 1.6 version
+
+#### 14.0.1
+ * Integrate latest changes from visualfsharp
+ * Trial release for new build in fcs\...
+
+#### 13.0.1
+ * Move docs --> docssrc
+
+#### 13.0.0
+ * Move FSharp.Compiler.Service.MSBuild.v12.dll to a separate nuget package
+
+#### 12.0.8
+ * Set bit on output executables correctly
+
+#### 12.0.7
+ * Integrate visualfsharp master
+
+#### 12.0.6
+ * [758: Fix project cracker when invalid path given](https://github.com/fsharp/FSharp.Compiler.Service/pull/758)
+
+#### 12.0.5
+ * Remove dependency on System.ValueTuple
+
+#### 12.0.3
+ * [De-duplicate module names again](https://github.com/fsharp/FSharp.Compiler.Service/pull/749)
+
+#### 12.0.2
+ * De-duplicate module names
+
+#### 12.0.1
+ * [Integrate visualfsharp and fsharp](https://github.com/fsharp/fsharp/pull/696)
+
+#### 11.0.10
+ * [Fix F# Interactive on Mono 4.0.9+](https://github.com/fsharp/fsharp/pull/696)
+
+#### 11.0.9
+ * [Make incremental builder counter atomic](https://github.com/fsharp/FSharp.Compiler.Service/pull/724)
+ * [Add IsValCompiledAsMethod to FSharpMemberOrFunctionOrValue](https://github.com/fsharp/FSharp.Compiler.Service/pull/727)
+ * [Check before ILTypeInfo.FromType](https://github.com/fsharp/FSharp.Compiler.Service/issues/734)
+ * [Transition over to dotnet cli Fsproj](https://github.com/fsharp/FSharp.Compiler.Service/issues/700)
+
+#### 11.0.8
+ * Depend on FSharp.Core package
+
+#### 11.0.6
+ * Fix [stack overflow exception](https://github.com/fsharp/FSharp.Compiler.Service/issues/672)
+
+#### 11.0.4
+ * Fix [out of range exception](https://github.com/fsharp/FSharp.Compiler.Service/issues/709)
+
+#### 11.0.2
+ * Integrate fsharp\fsharp and Microsoft\visualfsharp to 262deb017cfcd0f0d4138779ff42ede7dbf44c46
+
+#### 11.0.1
+ * Integrate fsharp\fsharp and Microsoft\visualfsharp to d0cc249b951374257d5a806939e42714d8a2f4c6
+
+#### 10.0.3
+ * [Expose assumeDotNetFramework in FSharpChecker.GetProjectOptionsFromScript](https://github.com/fsharp/FSharp.Compiler.Service/pull/699)
+ * [SemanticClassificationType should not be internal](https://github.com/fsharp/FSharp.Compiler.Service/pull/696)
+
+#### 10.0.1
+ * [Adds FormatValue to FsiEvaluationSession, using the fsi object values for formatting](https://github.com/fsharp/FSharp.Compiler.Service/pull/686)
+
+#### 10.0.0
+ * Integrate fsharp\fsharp and Microsoft\visualfsharp to c3e55bf0b10bf08790235dc585b8cdc75f71618e
+ * Integrate fsharp\fsharp and Microsoft\visualfsharp to 11c0a085c96a91102cc881145ce281271ac159fe
+ * Some API changes for structured text provision for tagged structured text
+
+#### 9.0.0
+ * Update names of union fields in AST API
+ * Fix load closure for ParseAndCheckInteraction
+ * [Fix #631 compiler dependency on MSBuild](https://github.com/fsharp/FSharp.Compiler.Service/pull/657)
+ * Fixed netcore codegen on Linux
+ * Explicit error when cracker exe is missing
+
+#### 8.0.0
+ * Integrate fsharp\fsharp and Microsoft\visualfsharp to c494a9cab525dbd89585f7b733ea5310471a8001
+ * Then integrate to 2002675f8aba5b3576a924a2e1e47b18e4e9a83d
+ * [Add module values to navigable items](https://github.com/fsharp/FSharp.Compiler.Service/pull/650)
+ * Optionally remove dependency on MSBuild reference resolution https://github.com/fsharp/FSharp.Compiler.Service/pull/649
+ * [Compiler api harmonise](https://github.com/fsharp/FSharp.Compiler.Service/pull/639)
+ * Various bits of work on .NET Core version (buildable from source but not in nuget package)
+
+#### 7.0.0
+ * Integrate fsharp\fsharp and Microsoft\visualfsharp to 835b79c041f9032fceeceb39f680e0662cba92ec
+
+#### 6.0.2
+ * [Fix #568: recognize provided expressions](https://github.com/fsharp/FSharp.Compiler.Service/pull/568)
+
+#### 6.0.1
+ * [Fix ProjectFileNames order when getting project options from script](https://github.com/fsharp/FSharp.Compiler.Service/pull/594)
+
+#### 6.0.0
+ * Switch to new major version on assumption integrated F# compiler changes induce API change
+
+#### 5.0.2
+ * Integrate Microsoft\visualfsharp to 688c26bdbbfc766326fc45e4d918f87fcba1e7ba. F# 4.1 work
+
+#### 5.0.1
+* [Fixed dependencies in nuget package](https://github.com/fsharp/FSharp.Compiler.Service/pull/608)
+
+#### 5.0.0
+* Fixed empty symbol declared pdb #564 from kekyo/fix-empty-pdb
+* .NET Core ProjectCracker - updated version and dependencies
+* Properly embed 'FSIstrings' resource, fixes #591
+* make build.sh work on windows (git bash).
+* Added default script references for .NET Core
+* Store useMonoResolution flag
+* Updated MSBuild version
+* Assume FSharp.Core 4.4.0.0
+
+#### 4.0.1
+* Integrate Microsoft\visualfsharp and fsharp\fsharp to master (including portable PDB)
+* Remove .NET Framework 4.0 support (now needs .NET Framework 4.5)
+
+#### 4.0.0
+* Integrate Microsoft\visualfsharp and fsharp\fsharp to master
+
+#### 3.0.0.0
+* #538 - BackgroundCompiler takes a very long time on a big solution with a very connected project dependency graph
+* #544 - Losing operator call when one of operands is application of a partially applied function
+* #534 - Function valued property erasing calls
+* #495 - Detupling missing when calling a module function value
+* #543 - Tuple not being destructured in AST
+* #541 - Results of multiple calls to active pattern are always bound to variable with same name
+* #539 - BasicPatterns.NewDelegate shows same value for different arguments
+
+#### 2.0.0.6
+* #530 - Adjust ProjectCracker NuGet for VS/NuGet
+
+#### 2.0.0.5
+* #527 - Provide API that includes printf specifier arities along with ranges
+
+#### 2.0.0.4
+* #519 - Change nuget layout for ProjectCracker package
+* #523 - Project cracking: spaces in file paths
+
+#### 2.0.0.3
+* #508 - Integrate visualfsharp/master removal of Silverlight #if
+* #513 - Make CrackerTool `internal` to prevent accidental usage
+* #515 - Add simple Visual Studio version detection for project cracker
+
+#### 2.0.0.2
+* Integrate visualfsharp/master and fsharp/master --> master
+* Expose QualifiedName and FileName of FSharpImplementationFileContents
+* Add FSharpErrorInfo.ErrorNumber
+
+#### 2.0.0.1-beta
+* Fix 452 - FSharpField.IsMutable = true for BCL enum cases
+* Fix 414 - Add IsInstanceMemberInCompiledCode
+
+#### 2.0.0.0-beta
+* Feature #470, #478, #479 - Move ProjectCracker to separate nuget package and DLL, used ProjectCrackerTool.exe to run
+* Feature #463 - Expose slot signatures of members in object expressions
+* Feature #469, #475 - Add EvalExpressionNonThrowing, EvalInteractionNonThrowing, EvalScriptNonThrowing
+* Fix #456 - FCS makes calls to kernel32.dll when running on OSX
+* Fix #473 - stack overflow in resolution logic
+* Fix #460 - Failure getting expression for a provided method call
+
+#### 1.4.2.3 -
+* Fix bug in loop optimization, apply https://github.com/Microsoft/visualfsharp/pull/756/
+
+#### 1.4.2.2 -
+* #488 - Performance problems with project references
+
+#### 1.4.2.1 -
+* #450 - Correct generation of ReferencedProjects
+
+#### 1.4.2.0 -
+* Fix bug in double lookup of cache, see https://github.com/fsharp/FSharp.Compiler.Service/pull/447
+
+#### 1.4.1 -
+* Add pause before backgrounnd work starts. The FCS request queue must be empty for 1 second before work will start
+* Write trace information about the reactor queue to the event log
+* Rewrite reactor to consistently prioritize queued work
+* Implement cancellation for queued work if it is cancelled prior to being executed
+* Adjust caching to check cache correctly if there is a gap before the request is executed
+
+#### 1.4.0.9 -
+* FSharpType.Format fix
+* Disable maximum-memory trigger by default until use case ironed out
+
+#### 1.4.0.8 -
+* FSharpType.Format now prettifies type variables. If necessary, FSharpType.Prettify can also be called
+* Add maximum-memory trigger to downsize FCS caches. Defaults to 1.7GB of allocaed memory in the system
+ process for a 32-bit process, and 2x this for a 64-bit process
+
+#### 1.4.0.7 -
+* fix 427 - Make event information available for properties which represent first-class uses of F#-declared events
+* fix 410 - Symbols for C# fields (and especially enum fields)
+* Expose implemented abstract slots
+* Fix problem with obscure filenames caught by Microsoft\visualfsharp tests
+* Integrate with visualfsharp master
+
+#### 1.4.0.6 -
+* fix 423 - Symbols for non-standard C# events
+* fix 235 - XmlDocSigs for references assemblies
+* fix 177 - GetAllUsesOfAllSymbolsInFile returns nothing for C# nested enum
+* make Internal.Utilities.Text.Lexing.Position a struct
+* Exposing assembly attributes on FSharpAssemblySignature
+* clean up IncrementalFSharpBuild.frameworkTcImportsCache
+
+#### 1.4.0.5 -
+* add more entries to FSharpTokenTag
+
+#### 1.4.0.4 -
+* add more entries to FSharpTokenTag
+* add PrettyNaming.QuoteIdentifierIfNeeded and PrettyNaming.KeywordNames
+
+#### 1.4.0.3 -
+* integrate Microsoft/visualfsharp OOB cleanup via fsharp/fsharp
+* Make Parser and Lexer private
+
+#### 1.4.0.2 -
+* #387 - types and arrays in F# attribute contructor arguments
+
+#### 1.4.0.1 - F# 4.0 support
+* Use FSharp.Core 4.4.0.0 by default for scripting scenarios if not FSharp.Core referenced by host process
+
+#### 1.4.0.0-beta - F# 4.0 support
+* Integrate F# 4.0 support into FSharp.Compiler.Service
+
+#### 1.3.1.0 -
+* simplified source indexing with new SourceLink
+* Add noframework option in AST compiler methods
+
+#### 0.0.90 -
+* Add fix for #343 Use ResolveReferences task
+* Expose BinFolderOfDefaultFSharpCompiler to editors
+* Fix the registry checking on mono to avoid unnecessary exceptions being thrown
+
+#### 0.0.89 -
+* Fix output location of referenced projects
+
+#### 0.0.88 -
+* Added Fix to allow implicit PCL references to be retrieved
+
+#### 0.0.87 -
+* Don't report fake symbols in indexing #325
+* Add EnclosingEntity for an active pattern group #327
+* Add ImmediateSubExpressions #284
+* integrate fsharp/fsharp master into master
+
+#### 0.0.85 -
+* Fix for FSharpSymbolUse for single case union type #301
+* Added supprt for ReturnParameter in nested functions
+
+#### 0.0.84 -
+* Added curried parameter groups for nested functions
+
+#### 0.0.83 -
+* Add Overloads to the symbols signature so it is publicly visible
+* Update OnEvaluation event to have FSharpSymbolUse information available
+
+#### 0.0.82 -
+* Better support for Metadata of C# (and other) Assemblies.
+* Expose the DefaultFileSystem as a type instead of anonymous
+
+#### 0.0.81 -
+* Update GetDeclarationListSymbols to expose FSharpSymbolUse
+* Improve reporting of format specifiers
+
+#### 0.0.80 -
+* Update to latest F# 3.1.3 (inclunding updated FsLex/FsYacc used in build of FCS)
+* Report printf specifiers from Service API
+* Improve Accessibility of non-F# symbols
+
+#### 0.0.79 -
+* Do not use memory mapped files when cracking a DLL to get an assembly reference
+* Fix for multilanguage projects in project cracker
+
+#### 0.0.78 -
+* Reduce background checker memory usage
+* add docs on FSharp.Core
+* docs on caches and queues
+
+#### 0.0.77 -
+* Update to github.com/fsharp/fsharp 05f426cee85609f2fe51b71473b07d7928bb01c8
+
+#### 0.0.76 -
+* Fix #249 - Fix TryFullName when used on namespaces of provided erased type definitions
+* Add OnEvaluation event to FCS to allow detailed information to be exposed
+
+#### 0.0.75 -
+* Do not use shared cursor for IL binaries (https://github.com/fsprojects/VisualFSharpPowerTools/issues/822)
+
+#### 0.0.74 -
+* Extension members are returned as members of current modules
+* Fix exceptions while cross-reference a type provider project
+
+#### 0.0.73 -
+* Add AssemblyContents and FSharpExpr to allow access to resolved, checked expression trees
+* Populate ReferencedProjects using ProjectFileInfo
+* Fix finding symbols declared in signature files
+* Add logging to project cracking facility
+
+#### 0.0.72 -
+* Allow project parser to be used on project file with relative paths
+* Expose attributes for non-F# symbols
+
+#### 0.0.71 -
+* More renamings in SourceCodeServices API for more consistent use of 'FSharp' prefix
+
+#### 0.0.70 -
+* Make FSharpProjectFileParser public
+* Fixes to project parser for Mono (.NET 4.0 component)
+* Renamings in SourceCodeServices API for more consistent use of 'FSharp' prefix
+
+#### 0.0.67 -
+* Fixes to project parser for Mono
+
+#### 0.0.66 -
+* Fixes to project parser for Mono
+* Use MSBuild v12.0 for reference resolution on .NET 4.5+
+
+#### 0.0.65 -
+* Fixes to project parser
+
+#### 0.0.64 -
+* Add project parser, particularly GetProjectOptionsFromProjectFile
+
+#### 0.0.63 -
+* #221 - Normalize return types of .NET events
+
+#### 0.0.62 -
+* Integrate to latest http://github.com/fsharp/fsharp (#80f9221f811217bd890b3a670d717ebc510aeeaf)
+
+#### 0.0.61 -
+* #216 - Return associated getters/setters from F# properties
+* #214 - Added missing XmlDocSig for FSharpMemberOrFunctionOrValue's Events, Methods and Properties
+* #213 - Retrieve information for all active pattern cases
+* #188 - Fix leak in file handles when using multiple instances of FsiEvaluationSession, and add optionally collectible assemblies
+
+#### 0.0.60 -
+* #207 - Add IsLiteral/LiteralValue to FSharpField
+* #205 - Add IsOptionalArg and related properties to FSharpParameter
+* #210 - Check default/override members via 'IsOverrideOrExplicitMember'
+* #209 - Add TryFullName to FSharpEntity
+
+#### 0.0.59 -
+* Fix for #184 - Fix EvalScript by using verbatim string for #Load
+* Fix for #183 - The line no. reporting is still using 0-based indexes in errors. This is confusing.
+
+#### 0.0.58 -
+* Fix for #156 - The FSharp.Core should be retrieved from the hosting environment
+
+#### 0.0.57 -
+* Second fix for #160 - Nuget package now contains .NET 4.0 and 4.5
+
+#### 0.0.56 -
+* Fix for #160 - Nuget package contains .NET 4.0 and 4.5
+
+#### 0.0.55 -
+* Integrate changes for F# 3.1.x, Fix #166
+
+#### 0.0.54 -
+* Fix for #159 - Unsubscribe from TP Invalidate events when disposing builders
+
+#### 0.0.53 -
+* Add queue length to InteractiveChecker
+
+#### 0.0.52 -
+* Fix caches keeping hold of stale entries
+
+#### 0.0.51 -
+* Add IsAccessible to FSharpSymbol, and ProjectContext.AccessibilityRights to give the context of an access
+
+#### 0.0.50 -
+* Fix #79 - FindUsesOfSymbol returns None at definition of properties with explicit getters and setters
+
+#### 0.0.49 -
+* Fix #138 - Fix symbol equality for provided type members
+* Fix #150 - Return IsGetterMethod = true for declarations of F# properties (no separate 'property' symbol is yet returned, see #79)
+* Fix #132 - Add IsStaticInstantiation on FSharpEntity to allow clients to detect fake symbols arising from application of static parameters
+* Fix #154 - Add IsArrayType on FSharpEntity to allow clients to detect the symbols for array types
+* Fix #96 - Return resolutions of 'Module' and 'Type' in "Module.field" and "Type.field"
+
+#### 0.0.48 -
+* Allow own fsi object without referencing FSharp.Compiler.Interactive.Settings.dll (#127)
+
+#### 0.0.47 -
+* Adjust fix for #143 for F# types with abstract+default events
+
+#### 0.0.46 -
+* Fix multi-project analysis when referenced projects have changed (#141)
+* Fix process exit on bad arguments to FsiEvaluationSession (#126)
+* Deprecate FsiEvaluationSession constructor and add FsiEvaluationSession.Create static method to allow for future API that can return errors
+* Return additional 'property' and 'event' methods for F#-defined types to regularize symbols (#108, #143)
+* Add IsPropertySetterMethod and IsPropertyGetterMethod which only return true for getter/setter methods, not properties. Deprecate IsSetterMethod and IsGetterMethod in favour of these.
+* Add IsEventAddMethod and IsEventRemoveMethod which return true for add/remove methods with an associated event
+* Change IsProperty and IsEvent to only return true for the symbols for properties and events, rather than the methods assocaited with these
+* Fix value of Assembly for some symbols (e.g. property symbols)
+
+#### 0.0.45 -
+* Add optional project cache size parameter to InteractiveChecker
+* Switch to openBinariesInMemory for SimpleSourceCodeServices
+* Cleanup SimpleSourceCodeServices to avoid code duplication
+
+#### 0.0.44 -
+* Integrate latest changes from visualfsharp.codeplex.com via github.com/fsharp/fsharp
+* Fix problem with task that generates description text of declaration
+* Add AllInterfaceTypes to FSharpEntity and FSharpType
+* Add BaseType to FSharpType to propagate instantiation
+* Add Instantiate to FSharpType
+
+#### 0.0.43 -
+* Fix #109 - Duplicates in GetUsesOfSymbolInFile
+
+#### 0.0.42 -
+* Fix #105 - Register enum symbols in patterns
+* Fix #107 - Return correct results for inheritance chain of .NET types
+* Fix #101 - Add DeclaringEntity property
+
+#### 0.0.41 -
+* Fixed #104 - Make all operations that may utilize the FCS reactor async
+* Add FSharpDisplayContext and FSharpType.Format
+* Replace GetSymbolAtLocationAlternate by GetSymbolUseAtLocation
+
+#### 0.0.40 -
+* Fixed #86 - Expose Microsoft.FSharp.Compiler.Interactive.Shell.Settings.fsi
+* Fixed #99 - Add IsNamespace property to FSharpEntity
+
+#### 0.0.39 -
+* Fixed #79 - Usage points for symbols in union patterns
+
+#### 0.0.38 -
+* Fixed #94 and #89 by addition of new properties to the FSharpSymbolUse type
+* Fixed #93 by addition of IsOpaque to FSharpEntity type
+* Fixed #92 - Issue with nested classes
+* Fixed #87 - Allow analysis of members from external assemblies
+
+#### 0.0.37 -
+* Obsolete HasDefaultValue - see https://github.com/fsharp/FSharp.Compiler.Service/issues/77
+
+#### 0.0.36 -
+* Fix #71 - Expose static parameters and xml docs of type providers
+* Fix #63 - SourceCodeServices: #r ignores include paths passed as command-line flags
+
+#### 0.0.35 -
+* Fix #38 - FSharp.Compiler.Services should tolerate an FSharp.Core without siginfo/optdata in the search path
+
+
+#### 0.0.34 -
+* Add StaticParameters property to entities, plus FSharpStaticParameter symbol
+* Fix #65
+
+#### 0.0.33 -
+* Add FullName and Assembly properties for symbols
+* Fix #76
+* Add Japanese documentation
+
+#### 0.0.32 -
+* Make ParseFileInProject asynchronous
+* Add ParseAndCheckFileInProject
+* Use cached results in ParseAndCheckFileInProject if available
+
+#### 0.0.31 -
+* Fix performance problem with CheckFileInProject
+
+#### 0.0.30 -
+* Add initial prototype version of multi-project support, through optional ProjectReferences in ProjectOptions. Leave this empty
+ to use DLL/file-based references to results from other projects.
+
+#### 0.0.29 -
+* Fix symbols for named union fields in patterns
+
+#### 0.0.28 -
+* Fix symbols for named union fields
+* Add FSharpActivePatternCase to refine FSharpSymbol
+
+#### 0.0.27 -
+* Fix exception tag symbol reporting
+
+#### 0.0.26 -
+* Fix off-by-one in reporting of range for active pattern name
+
+#### 0.0.25 -
+* Add optional source argument to TryGetRecentTypeCheckResultsForFile to specify that source must match exactly
+
+#### 0.0.24 -
+* Update version number as nuget package may not have published properly
+
+#### 0.0.23 -
+* Move to one-based line numbering everywhere
+* Provide better symbol information for active patterns
+
+#### 0.0.22 -
+* Provide symbol location for type parameters
+
+#### 0.0.21 -
+* Add GetUsesOfSymbolInFile
+* Better symbol resolution results for type parameter symbols
+
+#### 0.0.20 -
+* Update version number as nuget package may not have published properly
+
+#### 0.0.19 -
+* Change return type of GetAllUsesOfSymbol, GetAllUsesOfAllSymbols and GetAllUsesOfAllSymbolsInFile to FSharpSymbolUse
+* Add symbol uses when an abstract member is implemented.
+
+#### 0.0.18 -
+* Add GetAllUsesOfAllSymbols and GetAllUsesOfAllSymbolsInFile
+
+#### 0.0.17 -
+* Improvements to symbol accuracy w.r.t. type abbreviations
+
+#### 0.0.16 -
+* Make FSharpEntity.BaseType return an option
+* FsiSesion got a new "EvalScript" method which allows to evaluate .fsx files
+
+#### 0.0.15 -
+* Update version number as nuget package may not have published properly
+
+#### 0.0.14 -
+* Update version number as nuget package may not have published properly
+
+#### 0.0.13-alpha -
+* Fix #39 - Constructor parameters are mistaken for record fields in classes
+
+#### 0.0.12-alpha -
+* Make the parts of the lexer/parser used by 'XmlDoc' tools in F# VS Power tools public
+
+#### 0.0.11-alpha -
+* Add 'IsUnresolved'
+
+#### 0.0.10-alpha -
+* Fix bug where 'multiple references to FSharp.Core' was given as error for scripts
+
+#### 0.0.9-alpha -
+* Fix fsc corrupting assemblies when generating pdb files (really)
+* Give better error messages for missing assemblies
+* Report more information about symbols returned by GetSymbolAtLocation (through subtypes)
+* Fix typos in docs
+* Return full project results from ParseAndCheckInteraction
+* Be more robust to missing assembly references by default.
+
+#### 0.0.8-alpha -
+* Fix fsc corrupting assemblies when generating pdb files
+
+#### 0.0.7-alpha -
+* Fix docs
+* Make symbols more robust to missing assemblies
+* Be robust to failures on IncrementalBuilder creation
+* Allow use of MSBuild resolution by IncrementalBuilder
+
+#### 0.0.6-alpha -
+* Fix version number
+
+#### 0.0.5-alpha -
+* Added GetUsesOfSymbol(), FSharpSymbol type, GetSymbolAtLocation(...)
+
+#### 0.0.4-alpha -
+* Added documentation of file system API
+* Reporte errors correctly from ParseAndCheckProject
+
+
+#### 0.0.3-alpha -
+* Integrate FSharp.PowerPack.Metadata as the FSharp* symbol API
+* Renamed Param --> MethodGroupItemParameter and hid record from view, made into an object
+* Renamed Method --> MethodGroupItem and hid record from view, made into an object
+* Renamed Methods --> MethodGroup and hid record from view, made into an object
+* Renamed MethodGroup.Name --> MethodGroup.MethodName
+* Renamed DataTip --> ToolTip consistently across all text
+* Renamed CheckOptions --> ProjectOptions
+* Renamed TypeCheckAnswer --> CheckFileAnswer
+* Renamed UntypedParseInfo --> ParseFileResults
+* Removed GetCheckOptionsFromScriptRoot member overload in favour of optional argument
+* Renamed GetCheckOptionsFromScriptRoot --> GetProjectOptionsFromScript
+* Renamed UntypedParse --> ParseFileInProject
+* Renamed TypeCheckSource --> CheckFileInProjectIfReady
+* Added numerous methods to API including CheckFileInProject
+* Added experimental GetBackgroundCheckResultsForFileInProject, GetBackgroundParseResultsForFileInProject
+* Added PartialAssemblySignature to TypeCheckResults/CheckFileResults
+* Added CurrentPartialAssemblySignature to FsiEvaluationSession
+* Added ParseAndCheckInteraction to FsiEvaluationSession to support intellisense implementation against a script fragment
+* Added initial testing in tests/service
+* Added ParseAndCheckProject to SourceCodeServices API. This will eventually return "whole project" information such as symbol tables.
+* Added GetDefaultConfiguration to simplify process of configuring FsiEvaluationSession
+* Added PartialAssemblySignatureUpdated event to FsiEvaluationSession
+* Added travis build
+
+#### 0.0.2-alpha -
+* Integrate hosted FSI configuration, SimpleSourceCodeServices, cleanup to SourceCodeServices API
+
+
diff --git a/build.cmd b/fcs/build.cmd
similarity index 50%
rename from build.cmd
rename to fcs/build.cmd
index 4f9265e2d2..312c7ed738 100644
--- a/build.cmd
+++ b/fcs/build.cmd
@@ -1,12 +1,24 @@
@echo off
+.nuget\NuGet.exe restore -PackagesDirectory packages
+setlocal
+cd fcs
.paket\paket.bootstrapper.exe
+dotnet restore tools.fsproj
if errorlevel 1 (
+ endlocal
exit /b %errorlevel%
)
.paket\paket.exe restore
if errorlevel 1 (
+ endlocal
exit /b %errorlevel%
)
packages\FAKE\tools\FAKE.exe build.fsx %*
+if errorlevel 1 (
+ endlocal
+ exit /b %errorlevel%
+)
+endlocal
+exit /b 0
diff --git a/fcs/build.fsx b/fcs/build.fsx
new file mode 100644
index 0000000000..9580a3aa5f
--- /dev/null
+++ b/fcs/build.fsx
@@ -0,0 +1,223 @@
+// --------------------------------------------------------------------------------------
+// FAKE build script
+// --------------------------------------------------------------------------------------
+
+#I "packages/FAKE/tools"
+#r "packages/FAKE/tools/FakeLib.dll"
+open System
+open System.IO
+open Fake
+open Fake.AppVeyor
+open Fake.ReleaseNotesHelper
+
+#if MONO
+// prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196)
+System.Console.OutputEncoding <- System.Text.Encoding.UTF8
+#endif
+
+// --------------------------------------------------------------------------------------
+// Utilities
+// --------------------------------------------------------------------------------------
+
+let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x
+let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) ->
+#if MONO
+ let exe = exe.Replace("\\","/")
+ let args = args.Replace("\\","/")
+ printfn "[%s] mono %s %s" workDir exe args
+ Shell.Exec("mono", sprintf "%s %s" exe args, workDir)
+#else
+ printfn "[%s] %s %s" workDir exe args
+ Shell.Exec(exe, args, workDir)
+#endif
+ |> assertExitCodeZero
+)
+
+// --------------------------------------------------------------------------------------
+// The rest of the code is standard F# build script
+// --------------------------------------------------------------------------------------
+
+let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../Release")
+
+
+// Read release notes & version info from RELEASE_NOTES.md
+let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md")
+let isAppVeyorBuild = buildServer = BuildServer.AppVeyor
+let isVersionTag tag = Version.TryParse tag |> fst
+let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName
+let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion
+let nugetVersion = release.NugetVersion
+open SemVerHelper
+let nugetDebugVersion =
+ let semVer = SemVerHelper.parse nugetVersion
+ let debugPatch, debugPreRelease =
+ match semVer.PreRelease with
+ | None -> semVer.Patch + 1, { Origin = "alpha001"; Name = "alpha"; Number = Some 1; Parts = [AlphaNumeric "alpha001"] }
+ | Some pre ->
+ let num = match pre.Number with Some i -> i + 1 | None -> 1
+ let name = pre.Name
+ let newOrigin = sprintf "%s%03d" name num
+ semVer.Patch, { Origin = newOrigin; Name = name; Number = Some num; Parts = [AlphaNumeric newOrigin] }
+ let debugVer =
+ { semVer with
+ Patch = debugPatch
+ PreRelease = Some debugPreRelease }
+ debugVer.ToString()
+let buildDate = DateTime.UtcNow
+let buildVersion =
+ if hasRepoVersionTag then assemblyVersion
+ else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber
+ else assemblyVersion
+
+Target "BuildVersion" (fun _ ->
+ Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
+)
+
+// --------------------------------------------------------------------------------------
+// Clean build results & restore NuGet packages
+
+
+Target "Build.NetFx" (fun _ ->
+ !! "FSharp.Compiler.Service.sln"
+ |> MSBuild "" "Build" ["Configuration","Release" ]
+ |> Log (".NETFxBuild-Output: ")
+)
+
+
+// --------------------------------------------------------------------------------------
+// Run the unit tests using test runner
+
+Target "Test.NetFx" (fun _ ->
+ !! (releaseDir + "/fcs/net45/FSharp.Compiler.Service.Tests.dll")
+ |> Fake.Testing.NUnit3.NUnit3 (fun p ->
+ { p with
+ ToolPath = @"..\packages\NUnit.Console.3.0.0\tools\nunit3-console.exe"
+ ShadowCopy = false
+ TimeOut = TimeSpan.FromMinutes 20. })
+)
+
+// --------------------------------------------------------------------------------------
+// Build a NuGet package
+Target "NuGet.NetFx" (fun _ ->
+ runCmdIn __SOURCE_DIRECTORY__ @"..\.nuget\NuGet.exe" @"pack nuget\FSharp.Compiler.Service.nuspec -OutputDirectory %s" releaseDir
+ runCmdIn __SOURCE_DIRECTORY__ @"..\.nuget\NuGet.exe" @"pack nuget\FSharp.Compiler.Service.MSBuild.v12.nuspec -OutputDirectory %s" releaseDir
+ runCmdIn __SOURCE_DIRECTORY__ @"..\.nuget\NuGet.exe" @"pack nuget\FSharp.Compiler.Service.ProjectCracker.nuspec -OutputDirectory %s" releaseDir
+)
+
+
+
+// --------------------------------------------------------------------------------------
+// .NET Core and .NET Core SDK
+
+let isDotnetSDKInstalled =
+ match Fake.EnvironmentHelper.environVarOrNone "FCS_DNC" with
+ | Some flag ->
+ match bool.TryParse flag with
+ | true, result -> result
+ | _ -> false
+ | None ->
+ try
+ Shell.Exec("dotnet", "--info") = 0
+ with
+ _ -> false
+
+
+Target "Build.NetStd" (fun _ ->
+ runCmdIn __SOURCE_DIRECTORY__ "dotnet" "pack %s -v n -c Release" "FSharp.Compiler.Service.netstandard.sln"
+)
+
+
+Target "Test.NetStd" (fun _ ->
+ runCmdIn __SOURCE_DIRECTORY__ "dotnet" "run -p FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj -c Release -- --result:TestResults.NetStd.xml;format=nunit3"
+)
+
+
+//use dotnet-mergenupkg to merge the .NETstandard nuget package into the default one
+Target "Nuget.AddNetStd" (fun _ ->
+ let nupkg = sprintf "%s/FSharp.Compiler.Service.%s.nupkg" releaseDir release.AssemblyVersion
+ let netcoreNupkg = sprintf "FSharp.Compiler.Service.netstandard/bin/Release/FSharp.Compiler.Service.%s.nupkg" release.AssemblyVersion
+ runCmdIn __SOURCE_DIRECTORY__ "dotnet" "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg
+)
+
+
+// --------------------------------------------------------------------------------------
+// Generate the documentation
+
+Target "GenerateDocs" (fun _ ->
+ executeFSIWithArgs "docsrc/tools" "generate.fsx" ["--define:RELEASE"] [] |> ignore
+)
+
+Target "GenerateDocsJa" (fun _ ->
+ executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" ["--define:RELEASE"] [] |> ignore
+)
+
+// --------------------------------------------------------------------------------------
+// Release Scripts
+
+Target "PublishNuGet" (fun _ ->
+ Paket.Push (fun p ->
+ let apikey =
+ match getBuildParam "nuget-apikey" with
+ | s when not (String.IsNullOrWhiteSpace s) -> s
+ | _ -> getUserInput "Nuget API Key: "
+ { p with
+ ApiKey = apikey
+ WorkingDir = releaseDir })
+)
+
+// --------------------------------------------------------------------------------------
+// Run all targets by default. Invoke 'build ' to override
+
+Target "Clean" DoNothing
+Target "CleanDocs" DoNothing
+Target "Release" DoNothing
+Target "NuGet" DoNothing
+Target "Build" DoNothing
+Target "TestAndNuGet" DoNothing
+
+"Clean"
+ =?> ("BuildVersion", isAppVeyorBuild)
+ ==> "Build.NetStd"
+
+"Clean"
+ =?> ("BuildVersion", isAppVeyorBuild)
+ ==> "Build.NetFx"
+
+"Build.NetFx"
+ ==> "Test.NetFx"
+
+"Build.NetStd"
+ ==> "Test.NetStd"
+
+"Build.NetFx"
+ =?> ("Build.NetStd", isDotnetSDKInstalled)
+ ==> "Build"
+
+"Build.NetStd"
+ =?> ("Nuget.AddNetStd", isDotnetSDKInstalled)
+
+"Build.NetFx"
+ ==> "NuGet.NetFx"
+ =?> ("Nuget.AddNetStd", isDotnetSDKInstalled)
+ ==> "NuGet"
+
+"Test.NetFx"
+ ==> "TestAndNuGet"
+
+"NuGet"
+ ==> "TestAndNuGet"
+
+//"Test.NetStd"
+// ==> "TestAndNuGet"
+
+"Build"
+ ==> "NuGet"
+ ==> "PublishNuGet"
+ ==> "Release"
+
+"CleanDocs"
+ ==> "GenerateDocs"
+ ==> "GenerateDocsJa"
+ ==> "Release"
+
+RunTargetOrDefault "Build"
diff --git a/build.sh b/fcs/build.sh
similarity index 64%
rename from build.sh
rename to fcs/build.sh
index a7ff60d4ee..3e7e80e7d8 100755
--- a/build.sh
+++ b/fcs/build.sh
@@ -2,25 +2,19 @@
if test "$OS" = "Windows_NT"
then
# use .Net
- .paket/paket.bootstrapper.exe
- exit_code=$?
- if [ $exit_code -ne 0 ]; then
- exit $exit_code
- fi
+ cmd fcs/build.cmd $@
+else
+ mono .nuget/NuGet.exe restore -PackagesDirectory packages
- .paket/paket.exe restore
- exit_code=$?
- if [ $exit_code -ne 0 ]; then
- exit $exit_code
- fi
+ cd fcs
- packages/FAKE/tools/FAKE.exe build.fsx $@
-else
# use mono
if [[ ! -e ~/.config/.mono/certs ]]; then
mozroots --import --sync --quiet
fi
+ dotnet restore tools.fsproj
+
mono .paket/paket.bootstrapper.exe
exit_code=$?
if [ $exit_code -ne 0 ]; then
diff --git a/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Engine.dll b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Engine.dll
new file mode 100644
index 0000000000..da712783aa
Binary files /dev/null and b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Engine.dll differ
diff --git a/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Framework.dll b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Framework.dll
new file mode 100644
index 0000000000..f13d4f40fc
Binary files /dev/null and b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Framework.dll differ
diff --git a/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Tasks.v12.0.dll b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Tasks.v12.0.dll
new file mode 100644
index 0000000000..116eadc118
Binary files /dev/null and b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Tasks.v12.0.dll differ
diff --git a/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Utilities.v12.0.dll b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Utilities.v12.0.dll
new file mode 100644
index 0000000000..9a8014abc3
Binary files /dev/null and b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Utilities.v12.0.dll differ
diff --git a/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.dll b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.dll
new file mode 100644
index 0000000000..2ca81182c0
Binary files /dev/null and b/fcs/dependencies/MSBuild.v12.0/Microsoft.Build.dll differ
diff --git a/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Engine.dll b/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Engine.dll
new file mode 100644
index 0000000000..0661150997
Binary files /dev/null and b/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Engine.dll differ
diff --git a/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Framework.dll b/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Framework.dll
new file mode 100644
index 0000000000..74d6e05b85
Binary files /dev/null and b/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.Framework.dll differ
diff --git a/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.dll b/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.dll
new file mode 100644
index 0000000000..c702184ec0
Binary files /dev/null and b/fcs/dependencies/MSBuild.v14.0/Microsoft.Build.dll differ
diff --git a/samples/EditorService/paket.references b/fcs/dependencies/README.md
similarity index 100%
rename from samples/EditorService/paket.references
rename to fcs/dependencies/README.md
diff --git a/docsrc/content/caches.fsx b/fcs/docsrc/content/caches.fsx
similarity index 100%
rename from docsrc/content/caches.fsx
rename to fcs/docsrc/content/caches.fsx
diff --git a/docsrc/content/compiler.fsx b/fcs/docsrc/content/compiler.fsx
similarity index 100%
rename from docsrc/content/compiler.fsx
rename to fcs/docsrc/content/compiler.fsx
diff --git a/docsrc/content/corelib.fsx b/fcs/docsrc/content/corelib.fsx
similarity index 100%
rename from docsrc/content/corelib.fsx
rename to fcs/docsrc/content/corelib.fsx
diff --git a/docsrc/content/devnotes.md b/fcs/docsrc/content/devnotes.md
similarity index 100%
rename from docsrc/content/devnotes.md
rename to fcs/docsrc/content/devnotes.md
diff --git a/docsrc/content/editor.fsx b/fcs/docsrc/content/editor.fsx
similarity index 100%
rename from docsrc/content/editor.fsx
rename to fcs/docsrc/content/editor.fsx
diff --git a/docsrc/content/filesystem.fsx b/fcs/docsrc/content/filesystem.fsx
similarity index 100%
rename from docsrc/content/filesystem.fsx
rename to fcs/docsrc/content/filesystem.fsx
diff --git a/docsrc/content/fsharp-readme.md b/fcs/docsrc/content/fsharp-readme.md
similarity index 100%
rename from docsrc/content/fsharp-readme.md
rename to fcs/docsrc/content/fsharp-readme.md
diff --git a/docsrc/content/index.md b/fcs/docsrc/content/index.md
similarity index 100%
rename from docsrc/content/index.md
rename to fcs/docsrc/content/index.md
diff --git a/docsrc/content/interactive.fsx b/fcs/docsrc/content/interactive.fsx
similarity index 100%
rename from docsrc/content/interactive.fsx
rename to fcs/docsrc/content/interactive.fsx
diff --git a/docsrc/content/ja/compiler.fsx b/fcs/docsrc/content/ja/compiler.fsx
similarity index 100%
rename from docsrc/content/ja/compiler.fsx
rename to fcs/docsrc/content/ja/compiler.fsx
diff --git a/docsrc/content/ja/corelib.fsx b/fcs/docsrc/content/ja/corelib.fsx
similarity index 100%
rename from docsrc/content/ja/corelib.fsx
rename to fcs/docsrc/content/ja/corelib.fsx
diff --git a/docsrc/content/ja/devnotes.md b/fcs/docsrc/content/ja/devnotes.md
similarity index 100%
rename from docsrc/content/ja/devnotes.md
rename to fcs/docsrc/content/ja/devnotes.md
diff --git a/docsrc/content/ja/editor.fsx b/fcs/docsrc/content/ja/editor.fsx
similarity index 100%
rename from docsrc/content/ja/editor.fsx
rename to fcs/docsrc/content/ja/editor.fsx
diff --git a/docsrc/content/ja/filesystem.fsx b/fcs/docsrc/content/ja/filesystem.fsx
similarity index 100%
rename from docsrc/content/ja/filesystem.fsx
rename to fcs/docsrc/content/ja/filesystem.fsx
diff --git a/docsrc/content/ja/fsharp-readme.md b/fcs/docsrc/content/ja/fsharp-readme.md
similarity index 100%
rename from docsrc/content/ja/fsharp-readme.md
rename to fcs/docsrc/content/ja/fsharp-readme.md
diff --git a/docsrc/content/ja/index.md b/fcs/docsrc/content/ja/index.md
similarity index 100%
rename from docsrc/content/ja/index.md
rename to fcs/docsrc/content/ja/index.md
diff --git a/docsrc/content/ja/interactive.fsx b/fcs/docsrc/content/ja/interactive.fsx
similarity index 100%
rename from docsrc/content/ja/interactive.fsx
rename to fcs/docsrc/content/ja/interactive.fsx
diff --git a/docsrc/content/ja/project.fsx b/fcs/docsrc/content/ja/project.fsx
similarity index 100%
rename from docsrc/content/ja/project.fsx
rename to fcs/docsrc/content/ja/project.fsx
diff --git a/docsrc/content/ja/symbols.fsx b/fcs/docsrc/content/ja/symbols.fsx
similarity index 100%
rename from docsrc/content/ja/symbols.fsx
rename to fcs/docsrc/content/ja/symbols.fsx
diff --git a/docsrc/content/ja/tokenizer.fsx b/fcs/docsrc/content/ja/tokenizer.fsx
similarity index 100%
rename from docsrc/content/ja/tokenizer.fsx
rename to fcs/docsrc/content/ja/tokenizer.fsx
diff --git a/docsrc/content/ja/untypedtree.fsx b/fcs/docsrc/content/ja/untypedtree.fsx
similarity index 100%
rename from docsrc/content/ja/untypedtree.fsx
rename to fcs/docsrc/content/ja/untypedtree.fsx
diff --git a/docsrc/content/project.fsx b/fcs/docsrc/content/project.fsx
similarity index 100%
rename from docsrc/content/project.fsx
rename to fcs/docsrc/content/project.fsx
diff --git a/docsrc/content/queue.fsx b/fcs/docsrc/content/queue.fsx
similarity index 100%
rename from docsrc/content/queue.fsx
rename to fcs/docsrc/content/queue.fsx
diff --git a/docsrc/content/react.fsx b/fcs/docsrc/content/react.fsx
similarity index 100%
rename from docsrc/content/react.fsx
rename to fcs/docsrc/content/react.fsx
diff --git a/docsrc/content/symbols.fsx b/fcs/docsrc/content/symbols.fsx
similarity index 100%
rename from docsrc/content/symbols.fsx
rename to fcs/docsrc/content/symbols.fsx
diff --git a/docsrc/content/tokenizer.fsx b/fcs/docsrc/content/tokenizer.fsx
similarity index 100%
rename from docsrc/content/tokenizer.fsx
rename to fcs/docsrc/content/tokenizer.fsx
diff --git a/docsrc/content/typedtree.fsx b/fcs/docsrc/content/typedtree.fsx
similarity index 100%
rename from docsrc/content/typedtree.fsx
rename to fcs/docsrc/content/typedtree.fsx
diff --git a/docsrc/content/untypedtree.fsx b/fcs/docsrc/content/untypedtree.fsx
similarity index 100%
rename from docsrc/content/untypedtree.fsx
rename to fcs/docsrc/content/untypedtree.fsx
diff --git a/docsrc/files/content/fcs.css b/fcs/docsrc/files/content/fcs.css
similarity index 100%
rename from docsrc/files/content/fcs.css
rename to fcs/docsrc/files/content/fcs.css
diff --git a/docsrc/files/content/style.ja.css b/fcs/docsrc/files/content/style.ja.css
similarity index 100%
rename from docsrc/files/content/style.ja.css
rename to fcs/docsrc/files/content/style.ja.css
diff --git a/docsrc/files/images/en.png b/fcs/docsrc/files/images/en.png
similarity index 100%
rename from docsrc/files/images/en.png
rename to fcs/docsrc/files/images/en.png
diff --git a/docsrc/files/images/ja.png b/fcs/docsrc/files/images/ja.png
similarity index 100%
rename from docsrc/files/images/ja.png
rename to fcs/docsrc/files/images/ja.png
diff --git a/docsrc/files/images/logo.png b/fcs/docsrc/files/images/logo.png
similarity index 100%
rename from docsrc/files/images/logo.png
rename to fcs/docsrc/files/images/logo.png
diff --git a/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx
similarity index 94%
rename from docsrc/tools/generate.fsx
rename to fcs/docsrc/tools/generate.fsx
index f6aece3d80..e22ee8e326 100644
--- a/docsrc/tools/generate.fsx
+++ b/fcs/docsrc/tools/generate.fsx
@@ -32,9 +32,9 @@ open FSharp.MetadataFormat
let root = "."
// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../bin/v4.5"
+let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45"
let content = __SOURCE_DIRECTORY__ @@ "../content"
-let output = __SOURCE_DIRECTORY__ @@ "../../docs"
+let output = __SOURCE_DIRECTORY__ @@ "../../../docs"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting/"
@@ -60,7 +60,7 @@ let buildReference () =
( bin @@ lib, output @@ "reference", layoutRoots,
parameters = ("root", root)::info,
sourceRepo = "https://github.com/fsharp/FSharp.Compiler.Service/tree/master/src",
- sourceFolder = @"..\..\src" )
+ sourceFolder = @"..\..\..\src" )
// Build documentation from `fsx` and `md` files in `docsrc/content`
let buildDocumentation () =
@@ -73,6 +73,6 @@ let buildDocumentation () =
// Generate
copyFiles()
-buildDocumentation()
+//buildDocumentation()
buildReference()
diff --git a/docsrc/tools/generate.ja.fsx b/fcs/docsrc/tools/generate.ja.fsx
similarity index 80%
rename from docsrc/tools/generate.ja.fsx
rename to fcs/docsrc/tools/generate.ja.fsx
index 28c18f6cbc..b7e9b25d00 100644
--- a/docsrc/tools/generate.ja.fsx
+++ b/fcs/docsrc/tools/generate.ja.fsx
@@ -3,8 +3,6 @@
// (the generated documentation is stored in the 'docs' directory)
// --------------------------------------------------------------------------------------
-// Binaries that have XML documentation (in a corresponding generated XML file)
-let referenceBinaries = [ "FSharp.Compiler.Service.dll" ]
// Web site location for the generated documentation
let website = "/FSharp.Compiler.Service/ja"
@@ -47,30 +45,20 @@ let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output/ja")
#endif
// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../bin/v4.5"
+let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45"
let content = __SOURCE_DIRECTORY__ @@ "../content/ja"
-let output = __SOURCE_DIRECTORY__ @@ "../../docs"
-let outputJa = __SOURCE_DIRECTORY__ @@ "../../docs/ja"
+let outputJa = __SOURCE_DIRECTORY__ @@ "../../../docs/ja"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates/ja"
-let reference = __SOURCE_DIRECTORY__ @@ "reference"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"
// Where to look for *.csproj templates (in this order)
let layoutRoots =
[ templates
- reference
- formatting @@ "templates"
- formatting @@ "templates/reference" ]
+ formatting @@ "templates"]
// Copy static files and CSS + JS from F# Formatting
-let copyFiles () =
- CopyRecursive files output true |> Log "Copying file: "
- ensureDirectory (output @@ "content")
- CopyRecursive (formatting @@ "styles") (output @@ "content") true
- |> Log "Copying styles and scripts: "
-
// Build documentation from `fsx` and `md` files in `docsrc/content`
let buildDocumentation () =
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
@@ -82,5 +70,4 @@ let buildDocumentation () =
layoutRoots = layoutRoots, generateAnchors = true )
// Generate
-copyFiles()
buildDocumentation()
diff --git a/docsrc/tools/templates/ja/template.cshtml b/fcs/docsrc/tools/templates/ja/template.cshtml
similarity index 100%
rename from docsrc/tools/templates/ja/template.cshtml
rename to fcs/docsrc/tools/templates/ja/template.cshtml
diff --git a/docsrc/tools/templates/template.cshtml b/fcs/docsrc/tools/templates/template.cshtml
similarity index 100%
rename from docsrc/tools/templates/template.cshtml
rename to fcs/docsrc/tools/templates/template.cshtml
diff --git a/fcs/fcs.props b/fcs/fcs.props
new file mode 100644
index 0000000000..2753da7407
--- /dev/null
+++ b/fcs/fcs.props
@@ -0,0 +1,13 @@
+
+
+
+
+
+ 14.0.2
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools
+ fsi.exe
+
+
+
\ No newline at end of file
diff --git a/misc/logo.pdn b/fcs/misc/logo.pdn
similarity index 100%
rename from misc/logo.pdn
rename to fcs/misc/logo.pdn
diff --git a/misc/logo.png b/fcs/misc/logo.png
similarity index 100%
rename from misc/logo.png
rename to fcs/misc/logo.png
diff --git a/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec b/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec
new file mode 100644
index 0000000000..e2fc6d2fd7
--- /dev/null
+++ b/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec
@@ -0,0 +1,22 @@
+
+
+
+ FSharp.Compiler.Service.MSBuild.v12
+
+ Adds legacy MSBuild 12.0 support to the F# compiler services package for
+ resolving references such as #r "System, Version=4.1.0.0,..."
+
+ en-US
+ false
+ 14.0.2
+ Microsoft Corporation and F# community contributors
+ https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
+ https://github.com/fsharp/FSharp.Compiler.Service
+ https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png
+ F#, fsharp, interactive, compiler, editor
+ F# compiler services for creating IDE tools, language extensions and for F# embedding.
+
+
+
+
+
diff --git a/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec b/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec
new file mode 100644
index 0000000000..f9275ce232
--- /dev/null
+++ b/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec
@@ -0,0 +1,31 @@
+
+
+
+ FSharp.Compiler.Service.ProjectCracker
+
+ The F# compiler services package contains a custom build of the F# compiler that
+ exposes additional functionality for implementing F# language bindings, additional
+ tools based on the compiler or refactoring tools. The package also includes F#
+ interactive service that can be used for embedding F# scripting into your applications.
+
+ en-US
+ false
+ 14.0.2
+ Microsoft Corporation and F# community contributors
+ https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
+ https://github.com/fsharp/FSharp.Compiler.Service
+ https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png
+ F#, fsharp, interactive, compiler, editor
+ F# compiler services for creating IDE tools, language extensions and for F# embedding.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fcs/nuget/FSharp.Compiler.Service.nuspec b/fcs/nuget/FSharp.Compiler.Service.nuspec
new file mode 100644
index 0000000000..5b05dba395
--- /dev/null
+++ b/fcs/nuget/FSharp.Compiler.Service.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ FSharp.Compiler.Service
+
+ The F# compiler services package contains a custom build of the F# compiler that
+ exposes additional functionality for implementing F# language bindings, additional
+ tools based on the compiler or refactoring tools. The package also includes F#
+ interactive service that can be used for embedding F# scripting into your applications.
+
+ en-US
+ false
+ 14.0.2
+ Microsoft Corporation and F# community contributors
+ https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
+ https://github.com/fsharp/FSharp.Compiler.Service
+ https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png
+ F#, fsharp, interactive, compiler, editor
+ F# compiler services for creating IDE tools, language extensions and for F# embedding.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fcs/paket.dependencies b/fcs/paket.dependencies
new file mode 100644
index 0000000000..e0071842a8
--- /dev/null
+++ b/fcs/paket.dependencies
@@ -0,0 +1,7 @@
+frameworks: net45
+
+source https://www.nuget.org/api/v2/
+
+nuget FAKE
+nuget FSharp.Formatting
+
diff --git a/fcs/paket.lock b/fcs/paket.lock
new file mode 100644
index 0000000000..8df1dc9765
--- /dev/null
+++ b/fcs/paket.lock
@@ -0,0 +1,17 @@
+RESTRICTION: == net45
+NUGET
+ remote: https://www.nuget.org/api/v2
+ FAKE (4.63)
+ FSharp.Compiler.Service (2.0.0.6)
+ FSharp.Formatting (2.14.4)
+ FSharp.Compiler.Service (2.0.0.6)
+ FSharpVSPowerTools.Core (>= 2.3 < 2.4)
+ FSharpVSPowerTools.Core (2.3)
+ FSharp.Compiler.Service (>= 2.0.0.3)
+ NUnit (2.6.3)
+ NUnit.Runners (2.6.3)
+ Octokit (0.24)
+GITHUB
+ remote: fsharp/FAKE
+ modules/Octokit/Octokit.fsx (291f58cc70aba6dd871cf18e66d2d88357e4f208)
+ Octokit (>= 0.20)
\ No newline at end of file
diff --git a/samples/EditorService/App.config b/fcs/samples/EditorService/App.config
similarity index 100%
rename from samples/EditorService/App.config
rename to fcs/samples/EditorService/App.config
diff --git a/samples/EditorService/EditorService.fsproj b/fcs/samples/EditorService/EditorService.fsproj
similarity index 84%
rename from samples/EditorService/EditorService.fsproj
rename to fcs/samples/EditorService/EditorService.fsproj
index 72d9bf35aa..cf96ec6157 100644
--- a/samples/EditorService/EditorService.fsproj
+++ b/fcs/samples/EditorService/EditorService.fsproj
@@ -40,8 +40,9 @@
true
-
- True
+
+
+ $(SolutionDir)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll
@@ -53,12 +54,12 @@
-
+
FSharp.Compiler.Service
{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
True
-
+
\ No newline at end of file
diff --git a/samples/EditorService/Program.fs b/fcs/samples/EditorService/Program.fs
similarity index 94%
rename from samples/EditorService/Program.fs
rename to fcs/samples/EditorService/Program.fs
index c69167b6e7..20bf20cda7 100644
--- a/samples/EditorService/Program.fs
+++ b/fcs/samples/EditorService/Program.fs
@@ -31,7 +31,7 @@ let file = "/home/user/Test.fsx"
let identTokenTag = FSharpTokenTag.Identifier
let untyped, parsed = parseWithTypeInfo (file, input)
// Get tool tip at the specified location
-let tip = parsed.GetToolTipTextAlternate(2, 7, inputLines.[1], [ "foo" ], identTokenTag)
+let tip = parsed.GetToolTipText(2, 7, inputLines.[1], [ "foo" ], identTokenTag)
printfn "%A" tip
diff --git a/samples/FscExe/paket.references b/fcs/samples/EditorService/paket.references
similarity index 100%
rename from samples/FscExe/paket.references
rename to fcs/samples/EditorService/paket.references
diff --git a/fcs/samples/FscExe/App.config b/fcs/samples/FscExe/App.config
new file mode 100644
index 0000000000..a895438e29
--- /dev/null
+++ b/fcs/samples/FscExe/App.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/FscExe/FscExe.fsproj b/fcs/samples/FscExe/FscExe.fsproj
similarity index 78%
rename from samples/FscExe/FscExe.fsproj
rename to fcs/samples/FscExe/FscExe.fsproj
index 5fe71765d8..8c36589804 100644
--- a/samples/FscExe/FscExe.fsproj
+++ b/fcs/samples/FscExe/FscExe.fsproj
@@ -1,6 +1,10 @@
+
+
+ $(MSBuildProjectDirectory)\..\..\..\src
+
Debug
AnyCPU
@@ -47,26 +51,28 @@
true
-
- Resources/assemblyinfo.fsc.exe.fs
-
Driver/FscMain.fs
-
- True
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools\FSharp.Core.dll
+ true
-
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}
+
+
+
FSharp.Compiler.Service
+ {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
+ True
-
+
\ No newline at end of file
diff --git a/samples/FscExe/FscMain.fs b/fcs/samples/FscExe/FscMain.fs
old mode 100755
new mode 100644
similarity index 100%
rename from samples/FscExe/FscMain.fs
rename to fcs/samples/FscExe/FscMain.fs
diff --git a/samples/FsiExe/paket.references b/fcs/samples/FscExe/paket.references
similarity index 100%
rename from samples/FsiExe/paket.references
rename to fcs/samples/FscExe/paket.references
diff --git a/fcs/samples/FsiExe/App.config b/fcs/samples/FsiExe/App.config
new file mode 100644
index 0000000000..ac481ec64a
--- /dev/null
+++ b/fcs/samples/FsiExe/App.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/FsiExe/FsiExe.fsproj b/fcs/samples/FsiExe/FsiExe.fsproj
similarity index 82%
rename from samples/FsiExe/FsiExe.fsproj
rename to fcs/samples/FsiExe/FsiExe.fsproj
index 564a857119..18435f8ff0 100644
--- a/samples/FsiExe/FsiExe.fsproj
+++ b/fcs/samples/FsiExe/FsiExe.fsproj
@@ -1,6 +1,9 @@
+
+ $(MSBuildProjectDirectory)\..\..\..\src
+
Debug
AnyCPU
@@ -12,7 +15,7 @@
FsiExe
v4.5
FsiExe
- 4.4.0.0
+ 40
true
@@ -42,8 +45,10 @@
true
-
- True
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools\FSharp.Core.dll
+ true
@@ -60,11 +65,11 @@
-
+
FSharp.Compiler.Service
{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
True
-
+
\ No newline at end of file
diff --git a/samples/FsiExe/console.fs b/fcs/samples/FsiExe/console.fs
old mode 100755
new mode 100644
similarity index 100%
rename from samples/FsiExe/console.fs
rename to fcs/samples/FsiExe/console.fs
diff --git a/samples/FsiExe/fsimain.fs b/fcs/samples/FsiExe/fsimain.fs
old mode 100755
new mode 100644
similarity index 96%
rename from samples/FsiExe/fsimain.fs
rename to fcs/samples/FsiExe/fsimain.fs
index 6cd75b9c56..c11d3f0009
--- a/samples/FsiExe/fsimain.fs
+++ b/fcs/samples/FsiExe/fsimain.fs
@@ -154,8 +154,9 @@ let MainMain argv =
try
let console = new Microsoft.FSharp.Compiler.Interactive.ReadLineConsole()
- let getConsoleReadLine () =
- let probeToSeeIfConsoleWorks =
+ let getConsoleReadLine (probeToSeeIfConsoleWorks) =
+ let consoleIsOperational =
+ if probeToSeeIfConsoleWorks then
//if progress then fprintfn outWriter "probing to see if console works..."
try
// Probe to see if the console looks functional on this version of .NET
@@ -168,11 +169,12 @@ let MainMain argv =
with _ ->
//if progress then fprintfn outWriter "probe failed, we have no console..."
false
- if probeToSeeIfConsoleWorks then
- Some (fun () -> console.ReadLine())
- else
- None
-
+ else true
+ if consoleIsOperational then
+ Some (fun () -> console.ReadLine())
+ else
+ None
+
#if USE_FSharp_Compiler_Interactive_Settings
let fsiConfig0 = FsiEvaluationSession.GetDefaultConfiguration(fsi)
#else
@@ -200,7 +202,7 @@ let MainMain argv =
member __.StartServer(fsiServerName) = StartServer fsiSession fsiServerName
// Connect the configuration through to the 'fsi' Event loop
- member __.OptionalConsoleReadLine = getConsoleReadLine() }
+ member __.GetOptionalConsoleReadLine(probe) = getConsoleReadLine(probe) }
and fsiSession = FsiEvaluationSession.Create (fsiConfig, argv, Console.In, Console.Out, Console.Error)
diff --git a/samples/FsiExe/fsiserver.fs b/fcs/samples/FsiExe/fsiserver.fs
similarity index 100%
rename from samples/FsiExe/fsiserver.fs
rename to fcs/samples/FsiExe/fsiserver.fs
diff --git a/samples/InteractiveService/paket.references b/fcs/samples/FsiExe/paket.references
similarity index 100%
rename from samples/InteractiveService/paket.references
rename to fcs/samples/FsiExe/paket.references
diff --git a/samples/UntypedTree/App.config b/fcs/samples/InteractiveService/App.config
similarity index 55%
rename from samples/UntypedTree/App.config
rename to fcs/samples/InteractiveService/App.config
index 58f580b925..423a5517bd 100644
--- a/samples/UntypedTree/App.config
+++ b/fcs/samples/InteractiveService/App.config
@@ -5,10 +5,6 @@
-
-
-
-
\ No newline at end of file
diff --git a/samples/InteractiveService/InteractiveService.fsproj b/fcs/samples/InteractiveService/InteractiveService.fsproj
similarity index 82%
rename from samples/InteractiveService/InteractiveService.fsproj
rename to fcs/samples/InteractiveService/InteractiveService.fsproj
index 72f73e1bb9..c6b7ee6240 100644
--- a/samples/InteractiveService/InteractiveService.fsproj
+++ b/fcs/samples/InteractiveService/InteractiveService.fsproj
@@ -1,6 +1,9 @@
+
+ $(MSBuildProjectDirectory)\..\..\..\src
+
Debug
AnyCPU
@@ -40,8 +43,10 @@
true
-
- True
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools\FSharp.Core.dll
+ true
@@ -53,11 +58,11 @@
-
+
FSharp.Compiler.Service
{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
True
-
+
\ No newline at end of file
diff --git a/samples/InteractiveService/Program.fs b/fcs/samples/InteractiveService/Program.fs
similarity index 100%
rename from samples/InteractiveService/Program.fs
rename to fcs/samples/InteractiveService/Program.fs
diff --git a/samples/Tokenizer/paket.references b/fcs/samples/InteractiveService/paket.references
similarity index 100%
rename from samples/Tokenizer/paket.references
rename to fcs/samples/InteractiveService/paket.references
diff --git a/samples/Tokenizer/App.config b/fcs/samples/Tokenizer/App.config
similarity index 55%
rename from samples/Tokenizer/App.config
rename to fcs/samples/Tokenizer/App.config
index 58f580b925..423a5517bd 100644
--- a/samples/Tokenizer/App.config
+++ b/fcs/samples/Tokenizer/App.config
@@ -5,10 +5,6 @@
-
-
-
-
\ No newline at end of file
diff --git a/samples/Tokenizer/Program.fs b/fcs/samples/Tokenizer/Program.fs
similarity index 100%
rename from samples/Tokenizer/Program.fs
rename to fcs/samples/Tokenizer/Program.fs
diff --git a/samples/Tokenizer/Tokenizer.fsproj b/fcs/samples/Tokenizer/Tokenizer.fsproj
similarity index 83%
rename from samples/Tokenizer/Tokenizer.fsproj
rename to fcs/samples/Tokenizer/Tokenizer.fsproj
index 896c4cf0a5..6cbabe463e 100644
--- a/samples/Tokenizer/Tokenizer.fsproj
+++ b/fcs/samples/Tokenizer/Tokenizer.fsproj
@@ -1,6 +1,9 @@
+
+ $(MSBuildProjectDirectory)\..\..\..\src
+
Debug
AnyCPU
@@ -40,8 +43,10 @@
true
-
- True
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools\FSharp.Core.dll
+ true
@@ -53,7 +58,7 @@
-
+
FSharp.Compiler.Service
{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
True
@@ -62,5 +67,5 @@
11
-
+
\ No newline at end of file
diff --git a/samples/UntypedTree/paket.references b/fcs/samples/Tokenizer/paket.references
similarity index 100%
rename from samples/UntypedTree/paket.references
rename to fcs/samples/Tokenizer/paket.references
diff --git a/fcs/samples/UntypedTree/App.config b/fcs/samples/UntypedTree/App.config
new file mode 100644
index 0000000000..423a5517bd
--- /dev/null
+++ b/fcs/samples/UntypedTree/App.config
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/UntypedTree/Program.fs b/fcs/samples/UntypedTree/Program.fs
similarity index 100%
rename from samples/UntypedTree/Program.fs
rename to fcs/samples/UntypedTree/Program.fs
diff --git a/samples/UntypedTree/UntypedTree.fsproj b/fcs/samples/UntypedTree/UntypedTree.fsproj
similarity index 83%
rename from samples/UntypedTree/UntypedTree.fsproj
rename to fcs/samples/UntypedTree/UntypedTree.fsproj
index 129309aee4..c99bbab7eb 100644
--- a/samples/UntypedTree/UntypedTree.fsproj
+++ b/fcs/samples/UntypedTree/UntypedTree.fsproj
@@ -1,6 +1,9 @@
+
+ $(MSBuildProjectDirectory)\..\..\..\src
+
Debug
AnyCPU
@@ -40,8 +43,10 @@
true
-
- True
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools\FSharp.Core.dll
+ true
@@ -53,7 +58,7 @@
-
+
FSharp.Compiler.Service
{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
True
@@ -62,5 +67,5 @@
11
-
+
\ No newline at end of file
diff --git a/samples/UntypedTree/UntypedTree.sln b/fcs/samples/UntypedTree/UntypedTree.sln
similarity index 100%
rename from samples/UntypedTree/UntypedTree.sln
rename to fcs/samples/UntypedTree/UntypedTree.sln
diff --git a/src/fsharp/FSharp.Compiler.Service.MSBuild.v12/paket.references b/fcs/samples/UntypedTree/paket.references
similarity index 100%
rename from src/fsharp/FSharp.Compiler.Service.MSBuild.v12/paket.references
rename to fcs/samples/UntypedTree/paket.references
diff --git a/fcs/tools.fsproj b/fcs/tools.fsproj
new file mode 100644
index 0000000000..45aa251d76
--- /dev/null
+++ b/fcs/tools.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net45
+
+
+
+
+
+
\ No newline at end of file
diff --git a/init-tools.cmd b/init-tools.cmd
new file mode 100644
index 0000000000..111c8c80de
--- /dev/null
+++ b/init-tools.cmd
@@ -0,0 +1,108 @@
+@if not defined _echo @echo off
+setlocal
+
+set INIT_TOOLS_LOG=%~dp0init-tools.log
+set PACKAGES_DIR=%~dp0packages\
+set TOOLRUNTIME_DIR=%~dp0Tools
+
+set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
+set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
+
+set DOTNET_TOOLS_PATH=%TOOLRUNTIME_DIR%\dotnet20\
+set DOTNET_TOOLS_CMD=%DOTNET_TOOLS_PATH%dotnet.exe
+
+if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
+set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt"
+set BUILD_TOOLS_PATH=%PACKAGES_DIR%microsoft.dotnet.buildtools\%BUILDTOOLS_VERSION%\lib\
+set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
+set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
+set PROJECT_JSON_CONTENTS={ "dependencies": { "Microsoft.DotNet.BuildTools": "%BUILDTOOLS_VERSION%" , "Microsoft.DotNet.BuildTools.Coreclr": "1.0.4-prerelease"}, "frameworks": { "dnxcore50": { } } }
+set BUILD_TOOLS_SEMAPHORE=%PROJECT_JSON_PATH%\init-tools.completed0
+set TOOLS_INIT_RETURN_CODE=0
+
+:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
+if [%1]==[force] (
+ if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
+ if exist "%PACKAGES_DIR%microsoft.dotnet.buildtools" rmdir /S /Q "%PACKAGES_DIR%microsoft.dotnet.buildtools"
+)
+
+:: If sempahore exists do nothing
+if exist "%BUILD_TOOLS_SEMAPHORE%" (
+ echo Tools are already initialized.
+ goto :DONE
+)
+
+if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
+
+:: Download Nuget.exe
+if NOT exist "%PACKAGES_DIR%NuGet.exe" (
+ if NOT exist "%PACKAGES_DIR%" mkdir "%PACKAGES_DIR%"
+ powershell -NoProfile -ExecutionPolicy unrestricted -Command "$wc = New-Object System.Net.WebClient; $wc.Proxy = [System.Net.WebRequest]::DefaultWebProxy; $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials; $wc.DownloadFile('https://www.nuget.org/nuget.exe', '%PACKAGES_DIR%NuGet.exe')
+)
+
+if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
+echo %PROJECT_JSON_CONTENTS% > "%PROJECT_JSON_FILE%"
+echo Running %0 > "%INIT_TOOLS_LOG%"
+
+set /p DOTNET_TOOLS_VERSION=< "%~dp0DotnetCLIToolsVersion.txt"
+if exist "%DOTNET_TOOLS_PATH%" goto :afterdotnettoolsrestore
+
+echo Installing dotnet OLD VERSION OF THE cli...
+echo ==========================================
+echo This is temporary until we build using the new dotnetcli
+echo The dotnet cli is a large file it may take a few minutes ...
+echo powershell -ExecutionPolicy unrestricted -NoProfile -Command ".\scripts\dotnet-install.ps1 -InstallDir %DOTNET_TOOLS_PATH% -Architecture x64 -Version %DOTNET_TOOLS_VERSION% -NoPath true; exit $LastExitCode;"
+powershell -ExecutionPolicy unrestricted -NoProfile -Command ".\scripts\dotnet-install.ps1 -InstallDir %DOTNET_TOOLS_PATH% -Architecture x64 -Version %DOTNET_TOOLS_VERSION% -NoPath true; exit $LastExitCode;"
+if errorlevel 1 (
+ echo ERROR: Could not install dotnet cli correctly.
+ set TOOLS_INIT_RETURN_CODE=1
+ goto :DONE
+)
+:afterdotnettoolsrestore
+
+set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
+if exist "%DOTNET_CMD%" goto :afterdotnetrestore
+
+echo Installing dotnet cli...
+echo The dotnet cli is a large file it may take a few minutes ...
+echo powershell -ExecutionPolicy unrestricted -NoProfile -Command ".\scripts\dotnet-install.ps1 -InstallDir %DOTNET_PATH% -Architecture x64 -Version %DOTNET_VERSION% -NoPath true; exit $LastExitCode;"
+powershell -ExecutionPolicy unrestricted -NoProfile -Command ".\scripts\dotnet-install.ps1 -InstallDir %DOTNET_PATH% -Architecture x64 -Version %DOTNET_VERSION% -NoPath true; exit $LastExitCode;"
+if errorlevel 1 (
+ echo ERROR: Could not install dotnet cli correctly.
+ set TOOLS_INIT_RETURN_CODE=1
+ goto :DONE
+)
+:afterdotnetrestore
+
+if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
+echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
+echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages "%PACKAGES_DIR% " --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
+call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages "%PACKAGES_DIR% " --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
+if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
+ echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details.
+ set TOOLS_INIT_RETURN_CODE=1
+ goto :DONE
+)
+
+:afterbuildtoolsrestore
+
+echo Initializing BuildTools ...
+echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
+call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
+
+echo Updating CLI NuGet Frameworks map...
+robocopy "%TOOLRUNTIME_DIR%" "%DOTNET_PATH%\sdk\%DOTNET_VERSION%" NuGet.Frameworks.dll /XO >> "%INIT_TOOLS_LOG%"
+set UPDATE_CLI_ERRORLEVEL=%ERRORLEVEL%
+if %UPDATE_CLI_ERRORLEVEL% GTR 1 (
+ echo ERROR: Failed to update Nuget for CLI {Error level %UPDATE_CLI_ERRORLEVEL%}. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
+ exit /b %UPDATE_CLI_ERRORLEVEL%
+)
+
+:: Create sempahore file
+echo Done initializing tools.
+echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
+
+:DONE
+
+exit /b %TOOLS_INIT_RETURN_CODE%
+
diff --git a/init-tools.sh b/init-tools.sh
new file mode 100755
index 0000000000..9d5a2e2f8c
--- /dev/null
+++ b/init-tools.sh
@@ -0,0 +1,176 @@
+#!/usr/bin/env bash
+
+__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
+__init_tools_log=$__scriptpath/init-tools.log
+__PACKAGES_DIR=$__scriptpath/packages
+__TOOLRUNTIME_DIR=$__scriptpath/Tools
+
+__DOTNET_PATH=$__TOOLRUNTIME_DIR/dotnetcli
+__DOTNET_CMD=$__DOTNET_PATH/dotnet
+__DOTNET_VERSION=$(cat $__scriptpath/DotnetCLIVersion.txt)
+
+if [ -z "$__BUILDTOOLS_SOURCE" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; fi
+__BUILD_TOOLS_PACKAGE_VERSION=$(cat $__scriptpath/BuildToolsVersion.txt)
+
+
+__BUILD_TOOLS_PATH=$__PACKAGES_DIR/microsoft.dotnet.buildtools/$__BUILD_TOOLS_PACKAGE_VERSION/lib
+__PROJECT_JSON_PATH=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION
+__PROJECT_JSON_FILE=$__PROJECT_JSON_PATH/project.json
+__PROJECT_JSON_CONTENTS="{ \"dependencies\": { \"Microsoft.DotNet.BuildTools\": \"$__BUILD_TOOLS_PACKAGE_VERSION\" }, \"frameworks\": { \"netcoreapp1.0\": { } } }"
+__INIT_TOOLS_DONE_MARKER=$__PROJECT_JSON_PATH/done
+
+# Extended version of platform detection logic from dotnet/cli/scripts/obtain/dotnet-install.sh 16692fc
+get_current_linux_name() {
+ # Detect Distro
+ if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
+ if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then
+ echo "ubuntu.16.04"
+ return 0
+ fi
+ if [ "$(cat /etc/*-release | grep -cim1 16.10)" -eq 1 ]; then
+ echo "ubuntu.16.10"
+ return 0
+ fi
+
+ echo "ubuntu"
+ return 0
+ elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
+ echo "centos"
+ return 0
+ elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
+ echo "rhel"
+ return 0
+ elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
+ echo "debian"
+ return 0
+ elif [ "$(cat /etc/*-release | grep -cim1 alpine)" -eq 1 ]; then
+ echo "alpine"
+ return 0
+ elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
+ if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then
+ echo "fedora.23"
+ return 0
+ fi
+ if [ "$(cat /etc/*-release | grep -cim1 24)" -eq 1 ]; then
+ echo "fedora.24"
+ return 0
+ fi
+ elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
+ if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
+ echo "opensuse.13.2"
+ return 0
+ fi
+ if [ "$(cat /etc/*-release | grep -cim1 42.1)" -eq 1 ]; then
+ echo "opensuse.42.1"
+ return 0
+ fi
+ fi
+
+ # Cannot determine Linux distribution, assuming Ubuntu 14.04.
+ echo "ubuntu"
+ return 0
+}
+
+if [ -z "$__DOTNET_PKG" ]; then
+OSName=$(uname -s)
+ case $OSName in
+ Darwin)
+ OS=OSX
+ __DOTNET_PKG=dotnet-dev-osx-x64
+ ulimit -n 2048
+ ;;
+
+ Linux)
+ __DOTNET_PKG="dotnet-dev-$(get_current_linux_name)-x64"
+ OS=Linux
+ ;;
+
+ *)
+ echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools."
+ OS=Linux
+ __DOTNET_PKG=dotnet-dev-ubuntu-x64
+ ;;
+ esac
+fi
+
+if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
+ __PATCH_CLI_NUGET_FRAMEWORKS=0
+
+ if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi
+ echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log
+
+ if [ ! -e $__DOTNET_PATH ]; then
+
+ mkdir -p "$__DOTNET_PATH"
+
+ if [ -n "$DOTNET_TOOLSET_DIR" ] && [ -d "$DOTNET_TOOLSET_DIR/$__DOTNET_VERSION" ]; then
+ echo "Copying $DOTNET_TOOLSET_DIR/$__DOTNET_VERSION to $__DOTNET_PATH" >> $__init_tools_log
+ cp -r $DOTNET_TOOLSET_DIR/$__DOTNET_VERSION/* $__DOTNET_PATH
+ elif [ -n "$DOTNET_TOOL_DIR" ] && [ -d "$DOTNET_TOOL_DIR" ]; then
+ echo "Copying $DOTNET_TOOL_DIR to $__DOTNET_PATH" >> $__init_tools_log
+ cp -r $DOTNET_TOOL_DIR/* $__DOTNET_PATH
+ else
+ echo "Installing dotnet cli..."
+ echo "The dotnet cli is a large file it may take a few minutes ..."
+ ./scripts/dotnet-install.sh --install-dir "$__DOTNET_PATH" --architecture "x64" --runtime-id "linux-x64" --version "$__DOTNET_VERSION"
+ fi
+ fi
+
+ if [ ! -e $__DOTNET_TOOLS_PATH ]; then
+
+ mkdir -p "$__DOTNET_PATH"
+
+ if [ -n "$DOTNET_TOOLSET_DIR" ] && [ -d "$DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION" ]; then
+ echo "Copying $DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION to $__DOTNET_TOOLS_PATH" >> $__init_tools_log
+ cp -r $DOTNET_TOOLSET_DIR/$__DOTNET_VERSION/* $__DOTNET_PATH
+ elif [ -n "$DOTNET_TOOL_DIR" ] && [ -d "$DOTNET_TOOL_DIR" ]; then
+ echo "Copying $DOTNET_TOOL_DIR to $__DOTNET_TOOLS_PATH" >> $__init_tools_log
+ cp -r $DOTNET_TOOL_DIR/* $__DOTNET_PATH
+ else
+ echo "Installing dotnet cli..."
+ echo "The dotnet cli is a large file it may take a few minutes ..."
+ ./scripts/dotnet-install.sh --channel "release/2.0.0" --install-dir "$__DOTNET_PATH" --architecture "x64" --runtime-id "linux-x64" --version "$__DOTNET_VERSION"
+ fi
+ fi
+
+ if [ -n "$BUILD_TOOLS_TOOLSET_DIR" ] && [ -d "$BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION" ]; then
+ echo "Copying $BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION to $__TOOLRUNTIME_DIR" >> $__init_tools_log
+ cp -r $BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/* $__TOOLRUNTIME_DIR
+ elif [ -n "$BUILD_TOOLS_TOOL_DIR" ] && [ -d "$BUILD_TOOLS_TOOL_DIR" ]; then
+ echo "Copying $BUILD_TOOLS_TOOL_DIR to $__TOOLRUNTIME_DIR" >> $__init_tools_log
+ cp -r $BUILD_TOOLS_TOOL_DIR/* $__TOOLRUNTIME_DIR
+ else
+ if [ ! -d "$__PROJECT_JSON_PATH" ]; then mkdir "$__PROJECT_JSON_PATH"; fi
+ echo $__PROJECT_JSON_CONTENTS > "$__PROJECT_JSON_FILE"
+
+ if [ ! -e $__BUILD_TOOLS_PATH ]; then
+ echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..."
+ echo "Running: $__DOTNET_CMD restore \"$__PROJECT_JSON_FILE\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE" >> $__init_tools_log
+ $__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE >> $__init_tools_log
+ if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."1>&2; fi
+ fi
+
+ echo "Initializing BuildTools..."
+ echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log
+ $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log
+ if [ "$?" != "0" ]; then
+ echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2
+ exit 1
+ fi
+ fi
+
+ if [ $__PATCH_CLI_NUGET_FRAMEWORKS -eq 1 ]; then
+ echo "Updating CLI NuGet Frameworks map..."
+ cp $__TOOLRUNTIME_DIR/NuGet.Frameworks.dll $__TOOLRUNTIME_DIR/dotnetcli/sdk/$__DOTNET_VERSION >> $__init_tools_log
+ if [ "$?" != "0" ]; then
+ echo "ERROR: An error occured when updating Nuget for CLI . Please check '$__init_tools_log' for more details."1>&2
+ exit 1
+ fi
+ fi
+
+ touch $__INIT_TOOLS_DONE_MARKER
+
+ echo "Done initializing tools."
+else
+ echo "Tools are already initialized"
+fi
\ No newline at end of file
diff --git a/mono/FSharp.Compiler.Private/Makefile b/mono/FSharp.Compiler.Private/Makefile
new file mode 100644
index 0000000000..88a3d797b0
--- /dev/null
+++ b/mono/FSharp.Compiler.Private/Makefile
@@ -0,0 +1,10 @@
+NAME=FSharp.Compiler.Private
+ASSEMBLY = $(NAME).dll
+TOKEN=$(SIGN_TOKEN)
+
+include ../config.make
+
+install: install-sdk-lib
+
+
+
diff --git a/mono/build.bat b/mono/build.bat
new file mode 100644
index 0000000000..330f9fd108
--- /dev/null
+++ b/mono/build.bat
@@ -0,0 +1,45 @@
+@echo off
+
+:: Check prerequisites
+set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
+if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
+if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
+if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
+if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see http://www.microsoft.com/en-us/download/details.aspx?id=40760. && goto :eof
+
+set msbuildflags=/maxcpucount
+set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe"
+if not exist %_ngenexe% echo Note: Could not find ngen.exe.
+
+::Build
+
+%_ngenexe% install .\.nuget\NuGet.exe
+
+.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
+@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
+
+%_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsc.exe
+
+set BUILD_NET40=1
+set BUILD_NET40_FSHARP_CORE=1
+set BUILD_PORTABLE=1
+set TEST_NET40_COREUNIT_SUITE=1
+set TEST_PORTABLE_COREUNIT_SUITE=1
+
+%_msbuildexe% src\fsharp-proto-build.proj
+@if ERRORLEVEL 1 echo Error: "%_msbuildexe% src\fsharp-proto-build.proj" failed && goto :failure
+
+%_ngenexe% install Proto\net440\bin\fsc-proto.exe
+
+%_msbuildexe% %msbuildflags% build-everything.proj /p:TargetDotnetProfile=net40 /p:Configuration=Release
+@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetDotnetProfile=net40 /p:Configuration=Release" failed && goto :failure
+
+%_msbuildexe% %msbuildflags% src/fsharp/FSharp.Core/FSharp.Core.fsproj /p:TargetDotnetProfile=monotouch /p:Configuration=Release /p:KeyFile=..\..\..\mono\mono.snk
+@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetDotnetProfile=monotouch /p:Configuration=Release /p:KeyFile=..\..\..\mono.snk" failed && goto :failure
+
+
+@echo "Finished"
+goto :eof
+
+:failure
+exit /b 1
diff --git a/mono/config.make.in b/mono/config.make.in
new file mode 100644
index 0000000000..ef700f132b
--- /dev/null
+++ b/mono/config.make.in
@@ -0,0 +1,311 @@
+DEFAULT: all
+
+.PHONY: install-sdk-lib install-gac-lib
+
+prefix := @prefix@
+topdir := @abs_top_srcdir@/
+builddir := @abs_top_builddir@/
+libdir := ${prefix}/lib/
+bindir := ${prefix}/bin/
+monobindir := @MONOBINDIR@
+monolibdir := @MONOLIBDIR@
+monogacdir := @MONOGACDIR@
+
+monogacdir40 := @MONOGACDIR40@
+
+pclenabled47 := @PCLENABLED47@
+pclenabled7 := @PCLENABLED7@
+pclenabled78 := @PCLENABLED78@
+pclenabled259 := @PCLENABLED259@
+monotouchenabled := @MONOTOUCHENABLED@
+monodroidenabled := @MONODROIDENABLED@
+xamarinmacenabled := @XAMARINMACENABLED@
+
+monodir := ${libdir}mono
+
+TargetDotnetProfile = net40
+CONFIG = release
+Configuration = Release
+DISTVERSION = 201011
+
+# Version number mappings for various versions of FSharp.Core
+
+ifeq (x-$(TargetDotnetProfile)-,x-net40-)
+
+ifeq (x-$(FSharpCoreBackVersion)-,x--)
+VERSION = 4.4.1.0
+PKGINSTALL = yes
+REFASSEMPATH = .NETFramework/v4.0
+outsuffix = $(TargetDotnetProfile)
+endif
+
+ifeq (x-$(FSharpCoreBackVersion)-,x-3.0-)
+VERSION = 4.3.0.0
+REFASSEMPATH = .NETFramework/v4.0
+outsuffix = fsharp30/$(TargetDotnetProfile)
+endif
+
+ifeq (x-$(FSharpCoreBackVersion)-,x-3.1-)
+VERSION = 4.3.1.0
+REFASSEMPATH = .NETFramework/v4.0
+outsuffix = fsharp31/$(TargetDotnetProfile)
+endif
+
+ifeq (x-$(FSharpCoreBackVersion)-,x-4.0-)
+VERSION = 4.4.0.0
+REFASSEMPATH = .NETFramework/v4.0
+outsuffix = fsharp40/$(TargetDotnetProfile)
+endif
+
+endif
+
+ifeq (x-$(TargetDotnetProfile)-,x-monoandroid10+monotouch10+xamarinios10-)
+VERSION = 3.98.41.0
+outsuffix = $(TargetDotnetProfile)
+endif
+
+
+ifeq (x-$(TargetDotnetProfile)-,x-xamarinmacmobile-)
+VERSION = 3.99.41.0
+outsuffix = $(TargetDotnetProfile)
+endif
+
+ifeq (x-$(TargetDotnetProfile)-,x-portable47-)
+VERSION = 3.47.41.0
+PCLPATH = .NETPortable
+outsuffix = $(TargetDotnetProfile)
+endif
+
+ifeq (x-$(TargetDotnetProfile)-,x-portable7-)
+VERSION = 3.7.41.0
+PCLPATH = .NETCore
+outsuffix = $(TargetDotnetProfile)
+endif
+
+ifeq (x-$(TargetDotnetProfile)-,x-portable78-)
+VERSION = 3.78.41.0
+PCLPATH = .NETCore
+outsuffix = $(TargetDotnetProfile)
+endif
+
+ifeq (x-$(TargetDotnetProfile)-,x-portable259-)
+VERSION = 3.259.41.0
+PCLPATH = .NETCore
+outsuffix = $(TargetDotnetProfile)
+endif
+
+
+FSCORE_DELAY_SIGN_TOKEN = b03f5f7f11d50a3a
+SIGN_TOKEN = f536804aa0eb945b
+
+tmpdir = .libs/$(Configuration)/
+outdir = $(builddir)$(Configuration)/$(outsuffix)/bin/
+
+INSTALL = $(SHELL) $(topdir)/mono/install-sh
+INSTALL_BIN = $(INSTALL) -c -m 755
+INSTALL_LIB = $(INSTALL_BIN)
+
+XBUILD = @XBUILD@
+
+EXTRA_DIST = configure
+NO_DIST = .gitignore lib/debug lib/proto lib/release
+
+
+# Install .optdata/.sigdata if they exist (they go alongside FSharp.Core)
+# Install the .Targets file. The XBuild targets file gets installed into the place(s) expected for standard F# project
+# files. For F# 2.0 project files this is
+# /usr/lib/mono/Microsoft F#/v4.0/Microsoft.FSharp.Targets
+# For F# 3.0 project files this is
+# /usr/lib/mono/Microsoft SDKs/F#/3.0/Framework/v4.0/Microsoft.FSharp.Targets
+# For F# 3.1 project files this is
+# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v12.0/FSharp/Microsoft.FSharp.Targets
+# For F# 4.0 project files this is
+# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/FSharp/Microsoft.FSharp.Targets
+# For F# 4.1 project files this is
+# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/FSharp/Microsoft.FSharp.Targets
+#
+# Here 12.0/14.0/15.0 is 'VisualStudioVersion'. xbuild should set this to 11.0/12.0/14.0/15.0, copying MSBuild.
+#
+# We put the F# targets and link the SDK DLLs for all these locations
+#
+# We put a forwarding targets file into all three locations. We also put one in
+# .../lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets
+# since this is the location if 'xbuild' fails to set VisualStudioVersion.
+#
+install-sdk-lib:
+ @echo "Installing $(ASSEMBLY)"
+ @mkdir -p $(DESTDIR)$(monodir)/fsharp
+ @if test "x$(DELAY_SIGN)" = "x1"; then \
+ echo "Signing $(outdir)$(ASSEMBLY) with Mono key"; \
+ $(monobindir)/sn -q -R $(outdir)$(ASSEMBLY) $(topdir)mono/mono.snk; \
+ fi
+ @if test x-$(NAME) = x-FSharp.Compiler.Private; then \
+ echo "Installing extra dependency System.Collections.Immutable.dll to $(DESTDIR)$(monodir)/fsharp/"; \
+ $(INSTALL_LIB) $(outdir)System.Collections.Immutable.dll $(DESTDIR)$(monodir)/fsharp/; \
+ echo "Installing extra dependency System.Reflection.Metadata.dll to $(DESTDIR)$(monodir)/fsharp/"; \
+ $(INSTALL_LIB) $(outdir)System.Reflection.Metadata.dll $(DESTDIR)$(monodir)/fsharp/; \
+ fi
+ @if test x-$(NAME) = x-FSharp.Build; then \
+ echo "Installing Microsoft.FSharp.Targets and Microsoft.Portable.FSharp.Targets into install locations matching Visual Studio"; \
+ echo " --> $(DESTDIR)$(monodir)/fsharp/"; \
+ echo " --> $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/"; \
+ echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/"; \
+ echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/"; \
+ echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/"; \
+ echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/"; \
+ echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/"; \
+ echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/"; \
+ echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/"; \
+ echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/"; \
+ echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/"; \
+ \
+ mkdir -p $(tmpdir); \
+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \
+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \
+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \
+ mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
+ mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
+ mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
+ mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
+ mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
+ \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \
+ \
+ echo '' > $(tmpdir)Microsoft.FSharp.Targets; \
+ echo ' ' >> $(tmpdir)Microsoft.FSharp.Targets; \
+ echo '' >> $(tmpdir)Microsoft.FSharp.Targets; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
+ \
+ echo '' > $(tmpdir)Microsoft.Portable.FSharp.Targets; \
+ echo ' ' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \
+ echo '' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
+ fi
+ @if test x-$(outsuffix) = x-net40; then \
+ if test -e $(outdir)$(NAME).dll; then \
+ echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \
+ mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/; \
+ fi; \
+ if test -e $(outdir)$(NAME).dll.config; then \
+ echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \
+ mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).dll.config $(DESTDIR)$(monodir)/fsharp/; \
+ fi; \
+ if test -e $(outdir)$(NAME).xml; then \
+ echo "Installing $(outdir)$(NAME).xml into $(DESTDIR)$(monodir)/fsharp/"; \
+ mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/; \
+ fi; \
+ if test -e $(outdir)$(NAME).sigdata; then \
+ echo "Installing $(outdir)$(NAME).sigdata into $(DESTDIR)$(monodir)/fsharp/"; \
+ mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/; \
+ fi; \
+ if test -e $(outdir)$(NAME).optdata; then \
+ echo "Installing $(outdir)$(NAME).optdata into $(DESTDIR)$(monodir)/fsharp/"; \
+ mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/; \
+ fi; \
+ fi
+ @if test x-$(NAME) = x-FSharp.Core && test x-$(REFASSEMPATH) != x-; then \
+ echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \
+ echo " --> $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)"; \
+ mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION); \
+ $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
+ fi
+ @if test x-$(NAME) = x-FSharp.Core && test x-$(PCLPATH) != x-; then \
+ echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \
+ echo " --> $(DESTDIR)$(monodir)/fsharp/$(PCLPATH)/$(VERSION)"; \
+ mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION); \
+ $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
+ fi
+
+# Install the library binaries in the GAC directory,
+install-gac-lib:
+ $(eval TARGET = "4.5")
+ @echo "Installing $(ASSEMBLY)"
+ @if test "x$(DELAY_SIGN)" = "x1"; then \
+ echo "Signing $(outdir)$(ASSEMBLY) with Mono key"; \
+ $(monobindir)/sn -q -R $(outdir)$(ASSEMBLY) $(topdir)mono/mono.snk; \
+ fi
+ @if test -e $(outdir)$(NAME).dll; then \
+ if test x-$(NAME) = x-FSharp.Core && test x-$(PKGINSTALL) = x-yes; then \
+ echo "Using gacutil to install $(outdir)$(ASSEMBLY) into GAC root $(DESTDIR)$(libdir) as package $(TARGET)"; \
+ $(monobindir)/gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)$(libdir) -package $(TARGET); \
+ else \
+ echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/"; \
+ mkdir -p $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ fi; \
+ fi
+
+ @if test -e $(outdir)$(NAME).xml; then \
+ echo "Installing $(outdir)$(NAME).xml into $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/"; \
+ mkdir -p $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ if test x-$(PKGINSTALL) = x-yes && test x-$(NAME) = x-FSharp.Core; then \
+ echo "Using linking to ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml to install $(DESTDIR)$(libdir)mono/$(TARGET)/$(NAME).xml"; \
+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)$(libdir)mono/$(TARGET)/$(NAME).xml; \
+ fi; \
+ fi
+ @if test -e $(outdir)$(NAME).sigdata; then \
+ echo "Installing $(outdir)$(NAME).sigdata into $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/"; \
+ mkdir -p $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ if test x-$(PKGINSTALL) = x-yes; then \
+ echo "Using linking to ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata to install $(DESTDIR)$(libdir)mono/$(TARGET)/$(NAME).sigdata"; \
+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)$(libdir)mono/$(TARGET)/$(NAME).sigdata; \
+ fi; \
+ fi
+ @if test -e $(outdir)$(NAME).optdata; then \
+ echo "Installing $(outdir)$(NAME).optdata into $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/"; \
+ mkdir -p $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \
+ if test x-$(PKGINSTALL) = x-yes; then \
+ echo "Using linking to ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata to install $(DESTDIR)$(libdir)mono/$(TARGET)/$(NAME).optdata"; \
+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)$(libdir)mono/$(TARGET)/$(NAME).optdata; \
+ fi; \
+ fi
+
+
+# The binaries fsc.exe and fsi.exe only get installed for Mono 4.5 profile
+# This also installs 'fsharpc' and 'fsharpi' and 'fsharpiAnyCpu'
+install-bin:
+ chmod +x $(outdir)$(ASSEMBLY)
+ sed -e 's,[@]DIR[@],$(monodir)/fsharp,g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' -e 's,[@]MONOBINDIR[@],$(monobindir),g' < $(topdir)mono/launcher > $(outdir)$(subst fs,fsharp,$(NAME))
+ chmod +x $(outdir)$(subst fs,fsharp,$(NAME))
+ @mkdir -p $(DESTDIR)$(monodir)/fsharp
+ @mkdir -p $(DESTDIR)$(bindir)
+ $(INSTALL_BIN) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/fsharp
+ $(INSTALL_BIN) $(outdir)$(ASSEMBLY).config $(DESTDIR)$(monodir)/fsharp
+ $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME)) $(DESTDIR)$(bindir)
+
+
diff --git a/mono/prepare-mono.sh b/mono/prepare-mono.sh
new file mode 100755
index 0000000000..9354510319
--- /dev/null
+++ b/mono/prepare-mono.sh
@@ -0,0 +1,83 @@
+#!/usr/bin/env sh
+
+# OS detection
+
+OSName=$(uname -s)
+case $OSName in
+ Darwin)
+ OS=OSX
+ ;;
+
+ Linux)
+ OS=Linux
+ ;;
+
+ *)
+ echo "Unsupported OS '$OSName' detected. Cannot continue with build, the scripts must be updated to support this OS."
+ exit 1
+ ;;
+esac
+
+# On Linux (or at least, Ubuntu), when building with Mono, need to install the mono-devel package first.
+if [ $OS = 'Linux' ]; then
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+ echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
+ sudo apt-get update
+ sudo apt-get -y install mono-devel
+fi
+
+# Check if SSL certificates have been imported into Mono's certificate store.
+# If certs haven't been installed, some/all of the Nuget packages will fail to restore.
+#if [ $('certmgr -list -c Trust | grep -c -F "X.509"') -le 1 ]; then
+# echo "No SSL certificates installed so unable to restore NuGet packages." >&2;
+# echo "Run 'mozroots --sync --import' to install certificates to Mono's certificate store." >&2;
+# exit 1
+#fi
+
+# Restore NuGet packages (needed for compiler bootstrap and tests).
+mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config
+
+(if test x-$BUILD_CORECLR = x-1; then \
+ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'; \
+ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893; \
+ sudo apt-get update; \
+ sudo apt-get -y install dotnet-dev-1.0.0-preview2-003131; \
+ (cd tests/fsharp; mono ../../.nuget/NuGet.exe restore project.json -PackagesDirectory ../../packages -ConfigFile ../../.nuget/NuGet.Config); \
+ ./init-tools.sh; \
+ echo "------ start log"; \
+ cat ./init-tools.log; echo "------ end log"; \
+fi)
+
+(if test x-$BUILD_PROTO_WITH_CORECLR_LKG = x-1; then \
+ (cd lkg/fsc && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \
+ (cd lkg/fsi && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \
+fi)
+
+#TODO: work out how to avoid the need for this
+echo "chmod u+x packages/FSharp.Compiler.Tools.4.1.23/tools/fsi.exe"
+echo "chmod u+x packages/FsLexYacc.7.0.4/build/fslex.exe"
+echo "chmod u+x packages/FsLexYacc.7.0.4/build/fsyacc.exe"
+chmod u+x packages/FSharp.Compiler.Tools.4.1.23/tools/fsi.exe
+chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe
+chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe
+
+# The FSharp.Compiler.Tools package doesn't work correctly unless a proper install of F# has been done on the machine.
+# OSX can skip this because the OSX Mono installer includes F#.
+if [ $OS != 'OSX' ]; then
+ sudo apt-get -y install fsharp
+fi
+
+# "access to the path /etc/mono/registry/last-time is denied"
+# On non-OSX systems, may need to create Mono's registry folder to avoid exceptions during builds.
+# This doesn't seem to be necessary on OSX, as the folder is created by the installer.
+if [ $OS != 'OSX' ]; then
+ # This registry folder path is correct for Linux;
+ # on OSX the folder is /Library/Frameworks/Mono.framework/Versions/Current/etc/mono/registry
+ # and may be different for *BSD systems.
+ __MonoRegistryDir="/etc/mono/registry"
+ if [ ! -d "$__MonoRegistryDir" ]; then
+ echo "Mono registry directory does not exist (it may not have been created yet)."
+ echo "The directory needs to be created now; superuser permissions are required for this."
+ { sudo -- sh -c "mkdir -p $__MonoRegistryDir && chmod uog+rw $__MonoRegistryDir"; } || { echo "Unable to create/chmod Mono registry directory '$__MonoRegistryDir'." >&2; }
+ fi
+fi
diff --git a/netci.groovy b/netci.groovy
new file mode 100644
index 0000000000..ba971aaf9c
--- /dev/null
+++ b/netci.groovy
@@ -0,0 +1,95 @@
+import jobs.generation.Utilities;
+import jobs.generation.JobReport;
+
+def project = GithubProject
+def branch = GithubBranchName
+
+def osList = ['Windows_NT', 'Ubuntu14.04'] //, 'OSX'], 'CentOS7.1'
+
+def static getBuildJobName(def configuration, def os) {
+ return configuration.toLowerCase() + '_' + os.toLowerCase()
+}
+
+[true, false].each { isPullRequest ->
+ osList.each { os ->
+ def configurations = ['Debug', 'Release_ci_part1', 'Release_ci_part2', 'Release_ci_part3', 'Release_net40_no_vs' ];
+ if (os != 'Windows_NT') {
+ // Only build one configuration on Linux/... so far
+ configurations = ['Release'];
+ }
+ configurations.each { configuration ->
+
+ def lowerConfiguration = configuration.toLowerCase()
+
+ // Calculate job name
+ def jobName = getBuildJobName(configuration, os)
+
+ def buildCommand = '';
+
+ def buildFlavor= '';
+ if (configuration == "Debug") {
+ buildFlavor = "debug"
+ build_args = ""
+ }
+ else {
+ buildFlavor = "release"
+ if (configuration == "Release_ci_part1") {
+ build_args = "ci_part1"
+ }
+ else if (configuration == "Release_ci_part2") {
+ build_args = "ci_part2"
+ }
+ else if (configuration == "Release_ci_part3") {
+ build_args = "ci_part3"
+ }
+ else if (configuration == "Release_net40_no_vs") {
+ build_args = "net40"
+ }
+ else {
+ build_args = "ci"
+ }
+ }
+
+ if (os == 'Windows_NT') {
+ buildCommand = ".\\build.cmd ${buildFlavor} ${build_args}"
+ }
+ else {
+ buildCommand = "./build.sh ${buildFlavor} ${build_args}"
+ }
+
+ def newJobName = Utilities.getFullJobName(project, jobName, isPullRequest)
+ def newJob = job(newJobName) {
+ steps {
+ if (os == 'Windows_NT') {
+ batchFile("""
+echo *** Build Visual F# Tools ***
+
+.\\build.cmd ${buildFlavor} ${build_args}""")
+ }
+ else {
+ // Shell
+ shell(buildCommand)
+ }
+ }
+ }
+
+ // TODO: set to false after tests are fully enabled
+ def skipIfNoTestFiles = true
+
+ def affinity = configuration == 'Release_net40_no_vs' ? 'latest-or-auto' : (os == 'Windows_NT' ? 'latest-or-auto-dev15-0' : 'latest-or-auto')
+ Utilities.setMachineAffinity(newJob, os, affinity)
+ Utilities.standardJobSetup(newJob, project, isPullRequest, "*/${branch}")
+ Utilities.addArchival(newJob, "tests/TestResults/*.*", "", skipIfNoTestFiles, false)
+ Utilities.addArchival(newJob, "${buildFlavor}/**")
+
+ if (isPullRequest) {
+ Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${configuration} Build")
+ }
+ else {
+ Utilities.addGithubPushTrigger(newJob)
+ }
+ }
+ }
+}
+
+JobReport.Report.generateJobReport(out)
diff --git a/nuget/FSharp.Compiler.Service.MSBuild.v12.template b/nuget/FSharp.Compiler.Service.MSBuild.v12.template
deleted file mode 100644
index 1a3473ec89..0000000000
--- a/nuget/FSharp.Compiler.Service.MSBuild.v12.template
+++ /dev/null
@@ -1,16 +0,0 @@
-type file
-id FSharp.Compiler.Service.MSBuild.v12
-description
- Adds legacy MSBuild 12.0 support to the F# compiler services package for
- resolving references such as #r "System, Version=4.1.0.0,..."
-authors
- Microsoft Corporation, Dave Thomas, Anh-Dung Phan, Tomas Petricek
-summary
- Adds legacy MSBuild 12.0 support to the F# compiler services package
-licenseurl https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
-projecturl https://github.com/fsharp/FSharp.Compiler.Service
-iconurl https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png
-tags
- F#, fsharp, interactive, compiler, editor
-files
- ../bin/v4.5/FSharp.Compiler.Service.MSBuild.v12.dll ==> lib/net45
diff --git a/nuget/FSharp.Compiler.Service.ProjectCracker.template b/nuget/FSharp.Compiler.Service.ProjectCracker.template
deleted file mode 100644
index cadb13b569..0000000000
--- a/nuget/FSharp.Compiler.Service.ProjectCracker.template
+++ /dev/null
@@ -1,21 +0,0 @@
-type file
-id FSharp.Compiler.Service.ProjectCracker
-description
- Adds F# project cracking capabilities.
-authors
- Microsoft Corporation, Robin Neatherway
-summary
- Cracking projects
-licenseurl https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
-projecturl https://github.com/fsharp/FSharp.Compiler.Service
-iconurl https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png
-tags
- F#, fsharp, msbuild, editor
-files
- ../src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets ==> build/net45
- ../bin/v4.5/FSharp.Compiler.Service.ProjectCrackerTool.exe ==> utilities/net45
- ../bin/v4.5/FSharp.Compiler.Service.ProjectCrackerTool.exe.config ==> utilities/net45
- ../bin/v4.5/FSharp.Compiler.Service.ProjectCrackerTool.?db ==> utilities/net45
- ../bin/v4.5/FSharp.Compiler.Service.ProjectCracker.dll ==> lib/net45
- ../bin/v4.5/FSharp.Compiler.Service.ProjectCracker.xml ==> lib/net45
- ../bin/v4.5/FSharp.Compiler.Service.ProjectCracker.?db ==> lib/net45
diff --git a/nuget/FSharp.Compiler.Service.template b/nuget/FSharp.Compiler.Service.template
deleted file mode 100644
index 9c3b7a4eda..0000000000
--- a/nuget/FSharp.Compiler.Service.template
+++ /dev/null
@@ -1,24 +0,0 @@
-type file
-id FSharp.Compiler.Service
-description
- The F# compiler services package contains a custom build of the F# compiler that
- exposes additional functionality for implementing F# language bindings, additional
- tools based on the compiler or refactoring tools. The package also includes F#
- interactive service that can be used for embedding F# scripting into your applications.
-authors
- Microsoft Corporation, Dave Thomas, Anh-Dung Phan, Tomas Petricek
-summary
- F# compiler services for creating IDE tools, language extensions and for F# embedding.
-licenseurl https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
-projecturl https://github.com/fsharp/FSharp.Compiler.Service
-iconurl https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png
-tags
- F#, fsharp, interactive, compiler, editor
-files
- ../bin/v4.5/FSharp.Compiler.Service.dll ==> lib/net45
- ../bin/v4.5/FSharp.Compiler.Service.xml ==> lib/net45
- ../bin/v4.5/FSharp.Compiler.Service.?db ==> lib/net45
- ../bin/v4.5/FSharp.Compiler.Service.dll.?db ==> lib/net45
-dependencies
- System.Collections.Immutable >= LOCKEDVERSION
- System.Reflection.Metadata >= LOCKEDVERSION
\ No newline at end of file
diff --git a/packages.config b/packages.config
new file mode 100644
index 0000000000..5fb1b04cfb
--- /dev/null
+++ b/packages.config
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/paket.dependencies b/paket.dependencies
deleted file mode 100644
index 9dc81adc3e..0000000000
--- a/paket.dependencies
+++ /dev/null
@@ -1,26 +0,0 @@
-frameworks: net45, netstandard16, netcoreapp10
-
-# source https://www.myget.org/F/dotnet-core/api/v3/index.json
-source https://www.nuget.org/api/v2/
-
-nuget NUnit 2.6.3
-nuget NUnit.Runners 2.6.3
-nuget SQLite.Net-PCL 3.0.5
-nuget SQLite.Net.Platform.Generic 2.4.1
-
-# build dependencies
-# FAKE 4.53.0 is needed - latest FAKE invokes msbuild on Unix but on Mono 4.8.x that causes a failure with
-nuget FAKE
-nuget FSharp.Formatting
-nuget SourceLink.Fake
-nuget FsLexYacc
-nuget FSharp.Core 4.0.0.1
-nuget FSharp.Compiler.Tools 4.1.17
-nuget System.ValueTuple 4.3.0
-
-nuget System.Collections.Immutable 1.3.1
-nuget System.Reflection.Metadata 1.4.2
-nuget Microsoft.DiaSymReader.PortablePdb 1.2.0
-nuget Microsoft.DiaSymReader 1.1.0
-
-github fsharp/FAKE modules/Octokit/Octokit.fsx
\ No newline at end of file
diff --git a/paket.lock b/paket.lock
deleted file mode 100644
index 0e1f84c04b..0000000000
--- a/paket.lock
+++ /dev/null
@@ -1,190 +0,0 @@
-FRAMEWORK: NET45, NETSTANDARD16, NETCORE10
-NUGET
- remote: https://www.nuget.org/api/v2
- FAKE (4.61)
- FSharp.Compiler.Service (2.0.0.6)
- FSharp.Compiler.Tools (4.1.17)
- FSharp.Core (4.0.0.1)
- FSharp.Formatting (2.14.4)
- FSharp.Compiler.Service (2.0.0.6)
- FSharpVSPowerTools.Core (>= 2.3 < 2.4)
- FSharpVSPowerTools.Core (2.3)
- FSharp.Compiler.Service (>= 2.0.0.3)
- FsLexYacc (7.0.5)
- FsLexYacc.Runtime (>= 7.0.5 < 7.1)
- FsLexYacc.Runtime (7.0.5)
- FSharp.Core (>= 3.1.2.5)
- Microsoft.DiaSymReader (1.1)
- System.Diagnostics.Debug (>= 4.0.11) - framework: net45, netstandard16
- System.Runtime (>= 4.1) - framework: net45, netstandard16
- System.Runtime.InteropServices (>= 4.1) - framework: net45, netstandard16
- Microsoft.DiaSymReader.PortablePdb (1.2)
- Microsoft.DiaSymReader (>= 1.1) - framework: net45, netstandard16
- System.Collections (>= 4.3) - framework: net45, netstandard16
- System.Collections.Immutable (>= 1.3.1) - framework: net45, netstandard16
- System.Diagnostics.Debug (>= 4.3) - framework: net45, netstandard16
- System.Globalization (>= 4.3) - framework: net45, netstandard16
- System.IO (>= 4.3) - framework: net45, netstandard16
- System.Linq (>= 4.3) - framework: net45, netstandard16
- System.Reflection (>= 4.3) - framework: net45, netstandard16
- System.Reflection.Metadata (>= 1.4.2) - framework: net45, netstandard16
- System.Reflection.Primitives (>= 4.3) - framework: net45, netstandard16
- System.Runtime (>= 4.3) - framework: net45, netstandard16
- System.Runtime.Extensions (>= 4.3) - framework: net45, netstandard16
- System.Runtime.InteropServices (>= 4.3) - framework: net45, netstandard16
- System.Text.Encoding (>= 4.3) - framework: net45, netstandard16
- System.Threading (>= 4.3) - framework: net45, netstandard16
- Microsoft.NETCore.Platforms (1.1)
- Microsoft.NETCore.Targets (1.1)
- NUnit (2.6.3)
- NUnit.Runners (2.6.3)
- Octokit (0.24)
- runtime.native.System (4.3) - framework: net45, netstandard16
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- runtime.native.System.IO.Compression (4.3) - framework: net45, netstandard16
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- SourceLink.Fake (1.1)
- SQLite.Net-PCL (3.0.5)
- SQLite.Net.Platform.Generic (2.4.1)
- SQLite.Net-PCL
- System.Buffers (4.3) - framework: net45, netstandard16
- System.Diagnostics.Debug (>= 4.3) - framework: netstandard16
- System.Diagnostics.Tracing (>= 4.3) - framework: netstandard16
- System.Resources.ResourceManager (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Threading (>= 4.3) - framework: netstandard16
- System.Collections (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Collections.Immutable (1.3.1)
- System.Collections (>= 4.3) - framework: netstandard16
- System.Diagnostics.Debug (>= 4.3) - framework: netstandard16
- System.Globalization (>= 4.3) - framework: netstandard16
- System.Linq (>= 4.3) - framework: netstandard16
- System.Resources.ResourceManager (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Runtime.Extensions (>= 4.3) - framework: netstandard16
- System.Threading (>= 4.3) - framework: netstandard16
- System.Diagnostics.Debug (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Diagnostics.Tracing (4.3) - framework: net45, netstandard16
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Globalization (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.IO (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Text.Encoding (>= 4.3) - framework: netstandard16
- System.Threading.Tasks (>= 4.3) - framework: netstandard16
- System.IO.Compression (4.3) - framework: net45, netstandard16
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- runtime.native.System (>= 4.3) - framework: netstandard16
- runtime.native.System.IO.Compression (>= 4.3) - framework: netstandard16
- System.Buffers (>= 4.3) - framework: netstandard16
- System.Collections (>= 4.3) - framework: netstandard16
- System.Diagnostics.Debug (>= 4.3) - framework: netstandard16
- System.IO (>= 4.3) - framework: netstandard16
- System.Resources.ResourceManager (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Runtime.Extensions (>= 4.3) - framework: netstandard16
- System.Runtime.Handles (>= 4.3) - framework: netstandard16
- System.Runtime.InteropServices (>= 4.3) - framework: netstandard16
- System.Text.Encoding (>= 4.3) - framework: netstandard16
- System.Threading (>= 4.3) - framework: netstandard16
- System.Threading.Tasks (>= 4.3) - framework: netstandard16
- System.Linq (4.3)
- System.Collections (>= 4.3) - framework: netstandard16
- System.Diagnostics.Debug (>= 4.3) - framework: netstandard16
- System.Resources.ResourceManager (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Runtime.Extensions (>= 4.3) - framework: netstandard16
- System.Reflection (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.IO (>= 4.3) - framework: netstandard16
- System.Reflection.Primitives (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Reflection.Extensions (4.3) - framework: net45, netstandard16
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Reflection (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Reflection.Metadata (1.4.2)
- System.Collections (>= 4.3) - framework: netstandard16
- System.Collections.Immutable (>= 1.3.1) - framework: net45, netstandard16
- System.Diagnostics.Debug (>= 4.3) - framework: netstandard16
- System.IO (>= 4.3) - framework: netstandard16
- System.IO.Compression (>= 4.3) - framework: netstandard16
- System.Linq (>= 4.3) - framework: netstandard16
- System.Reflection (>= 4.3) - framework: netstandard16
- System.Reflection.Extensions (>= 4.3) - framework: netstandard16
- System.Reflection.Primitives (>= 4.3) - framework: netstandard16
- System.Resources.ResourceManager (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Runtime.Extensions (>= 4.3) - framework: netstandard16
- System.Runtime.InteropServices (>= 4.3) - framework: netstandard16
- System.Text.Encoding (>= 4.3) - framework: netstandard16
- System.Text.Encoding.Extensions (>= 4.3) - framework: netstandard16
- System.Threading (>= 4.3) - framework: netstandard16
- System.Reflection.Primitives (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Resources.ResourceManager (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Globalization (>= 4.3) - framework: netstandard16
- System.Reflection (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Runtime (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime.Extensions (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Runtime.Handles (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Runtime.InteropServices (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Reflection (>= 4.3) - framework: netstandard16
- System.Reflection.Primitives (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: net45, >= net462, netstandard16
- System.Runtime.Handles (>= 4.3) - framework: netstandard16
- System.Text.Encoding (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Text.Encoding.Extensions (4.3) - framework: net45, netstandard16
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Text.Encoding (>= 4.3) - framework: netstandard16
- System.Threading (4.3)
- System.Runtime (>= 4.3) - framework: netstandard16
- System.Threading.Tasks (>= 4.3) - framework: netstandard16
- System.Threading.Tasks (4.3)
- Microsoft.NETCore.Platforms (>= 1.1) - framework: netstandard16
- Microsoft.NETCore.Targets (>= 1.1) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
- System.ValueTuple (4.3)
- System.Collections (>= 4.3) - framework: netstandard16
- System.Resources.ResourceManager (>= 4.3) - framework: netstandard16
- System.Runtime (>= 4.3) - framework: netstandard16
-GITHUB
- remote: fsharp/FAKE
- modules/Octokit/Octokit.fsx (1d6610b1e593270db040fc30c9c06d15fb57388c)
- Octokit (>= 0.20)
\ No newline at end of file
diff --git a/scripts/dotnet-install.ps1 b/scripts/dotnet-install.ps1
new file mode 100644
index 0000000000..93d964540f
--- /dev/null
+++ b/scripts/dotnet-install.ps1
@@ -0,0 +1,503 @@
+#
+# Copyright (c) .NET Foundation and contributors. All rights reserved.
+# Licensed under the MIT license. See LICENSE file in the project root for full license information.
+#
+
+<#
+.SYNOPSIS
+ Installs dotnet cli
+.DESCRIPTION
+ Installs dotnet cli. If dotnet installation already exists in the given directory
+ it will update it only if the requested version differs from the one already installed.
+.PARAMETER Channel
+ Default: LTS
+ Download from the Channel specified. Possible values:
+ - Current - most current release
+ - LTS - most current supported release
+ - 2-part version in a format A.B - represents a specific release
+ examples: 2.0; 1.0
+ - Branch name
+ examples: release/2.0.0; Master
+.PARAMETER Version
+ Default: latest
+ Represents a build version on specific channel. Possible values:
+ - latest - most latest build on specific channel
+ - coherent - most latest coherent build on specific channel
+ coherent applies only to SDK downloads
+ - 3-part version in a format A.B.C - represents specific version of build
+ examples: 2.0.0-preview2-006120; 1.1.0
+.PARAMETER InstallDir
+ Default: %LocalAppData%\Microsoft\dotnet
+ Path to where to install dotnet. Note that binaries will be placed directly in a given directory.
+.PARAMETER Architecture
+ Default: - this value represents currently running OS architecture
+ Architecture of dotnet binaries to be installed.
+ Possible values are: , x64 and x86
+.PARAMETER SharedRuntime
+ Default: false
+ Installs just the shared runtime bits, not the entire SDK
+.PARAMETER DryRun
+ If set it will not perform installation but instead display what command line to use to consistently install
+ currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link
+ with specific version so that this command can be used deterministicly in a build script.
+ It also displays binaries location if you prefer to install or download it yourself.
+.PARAMETER NoPath
+ By default this script will set environment variable PATH for the current process to the binaries folder inside installation folder.
+ If set it will display binaries location but not set any environment variable.
+.PARAMETER Verbose
+ Displays diagnostics information.
+.PARAMETER AzureFeed
+ Default: https://dotnetcli.azureedge.net/dotnet
+ This parameter typically is not changed by the user.
+ It allows to change URL for the Azure feed used by this installer.
+.PARAMETER UncachedFeed
+ This parameter typically is not changed by the user.
+ It allows to change URL for the Uncached feed used by this installer.
+.PARAMETER ProxyAddress
+ If set, the installer will use the proxy when making web requests
+.PARAMETER ProxyUseDefaultCredentials
+ Default: false
+ Use default credentials, when using proxy address.
+#>
+[cmdletbinding()]
+param(
+ [string]$Channel="LTS",
+ [string]$Version="Latest",
+ [string]$InstallDir="",
+ [string]$Architecture="",
+ [switch]$SharedRuntime,
+ [switch]$DryRun,
+ [switch]$NoPath,
+ [string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
+ [string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet",
+ [string]$ProxyAddress,
+ [switch]$ProxyUseDefaultCredentials
+)
+
+Set-StrictMode -Version Latest
+$ErrorActionPreference="Stop"
+$ProgressPreference="SilentlyContinue"
+
+$BinFolderRelativePath=""
+
+# example path with regex: shared/1.0.0-beta-12345/somepath
+$VersionRegEx="/\d+\.\d+[^/]+/"
+$OverrideNonVersionedFiles=$true
+
+function Say($str) {
+ Write-Output "dotnet-install: $str"
+}
+
+function Say-Verbose($str) {
+ Write-Verbose "dotnet-install: $str"
+}
+
+function Say-Invocation($Invocation) {
+ $command = $Invocation.MyCommand;
+ $args = (($Invocation.BoundParameters.Keys | foreach { "-$_ `"$($Invocation.BoundParameters[$_])`"" }) -join " ")
+ Say-Verbose "$command $args"
+}
+
+function Invoke-With-Retry([ScriptBlock]$ScriptBlock, [int]$MaxAttempts = 3, [int]$SecondsBetweenAttempts = 1) {
+ $Attempts = 0
+
+ while ($true) {
+ try {
+ return $ScriptBlock.Invoke()
+ }
+ catch {
+ $Attempts++
+ if ($Attempts -lt $MaxAttempts) {
+ Start-Sleep $SecondsBetweenAttempts
+ }
+ else {
+ throw
+ }
+ }
+ }
+}
+
+function Get-Machine-Architecture() {
+ Say-Invocation $MyInvocation
+
+ # possible values: AMD64, IA64, x86
+ return $ENV:PROCESSOR_ARCHITECTURE
+}
+
+# TODO: Architecture and CLIArchitecture should be unified
+function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
+ Say-Invocation $MyInvocation
+
+ switch ($Architecture.ToLower()) {
+ { $_ -eq "" } { return Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) }
+ { ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" }
+ { $_ -eq "x86" } { return "x86" }
+ default { throw "Architecture not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" }
+ }
+}
+
+function Get-Version-Info-From-Version-Text([string]$VersionText) {
+ Say-Invocation $MyInvocation
+
+ $Data = @($VersionText.Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries));
+
+ $VersionInfo = @{}
+ $VersionInfo.CommitHash = $Data[0].Trim()
+ $VersionInfo.Version = $Data[1].Trim()
+ return $VersionInfo
+}
+
+function Load-Assembly([string] $Assembly) {
+ try {
+ Add-Type -Assembly $Assembly | Out-Null
+ }
+ catch {
+ # On Nano Server, Powershell Core Edition is used. Add-Type is unable to resolve base class assemblies because they are not GAC'd.
+ # Loading the base class assemblies is not unnecessary as the types will automatically get resolved.
+ }
+}
+
+function GetHTTPResponse([Uri] $Uri)
+{
+ Invoke-With-Retry(
+ {
+
+ $HttpClient = $null
+
+ try {
+ # HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet.
+ Load-Assembly -Assembly System.Net.Http
+
+ if(-not $ProxyAddress)
+ {
+ # Despite no proxy being explicitly specified, we may still be behind a default proxy
+ $DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
+ if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))){
+ $ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
+ $ProxyUseDefaultCredentials = $true
+ }
+ }
+
+ if($ProxyAddress){
+ $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler
+ $HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{Address=$ProxyAddress;UseDefaultCredentials=$ProxyUseDefaultCredentials}
+ $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler
+ }
+ else {
+ $HttpClient = New-Object System.Net.Http.HttpClient
+ }
+ # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out
+ # 10 minutes allows it to work over much slower connections.
+ $HttpClient.Timeout = New-TimeSpan -Minutes 10
+ $Response = $HttpClient.GetAsync($Uri).Result
+ if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode)))
+ {
+ $ErrorMsg = "Failed to download $Uri."
+ if ($Response -ne $null)
+ {
+ $ErrorMsg += " $Response"
+ }
+
+ throw $ErrorMsg
+ }
+
+ return $Response
+ }
+ finally {
+ if ($HttpClient -ne $null) {
+ $HttpClient.Dispose()
+ }
+ }
+ })
+}
+
+
+function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Coherent) {
+ Say-Invocation $MyInvocation
+
+ $VersionFileUrl = $null
+ if ($SharedRuntime) {
+ $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
+ }
+ else {
+ if ($Coherent) {
+ $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
+ }
+ else {
+ $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
+ }
+ }
+
+ $Response = GetHTTPResponse -Uri $VersionFileUrl
+ $StringContent = $Response.Content.ReadAsStringAsync().Result
+
+ switch ($Response.Content.Headers.ContentType) {
+ { ($_ -eq "application/octet-stream") } { $VersionText = [Text.Encoding]::UTF8.GetString($StringContent) }
+ { ($_ -eq "text/plain") } { $VersionText = $StringContent }
+ { ($_ -eq "text/plain; charset=UTF-8") } { $VersionText = $StringContent }
+ default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." }
+ }
+
+ $VersionInfo = Get-Version-Info-From-Version-Text $VersionText
+
+ return $VersionInfo
+}
+
+
+function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, [string]$Version) {
+ Say-Invocation $MyInvocation
+
+ switch ($Version.ToLower()) {
+ { $_ -eq "latest" } {
+ $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $False
+ return $LatestVersionInfo.Version
+ }
+ { $_ -eq "coherent" } {
+ $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $True
+ return $LatestVersionInfo.Version
+ }
+ default { return $Version }
+ }
+}
+
+function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) {
+ Say-Invocation $MyInvocation
+
+ if ($SharedRuntime) {
+ $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
+ }
+ else {
+ $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip"
+ }
+
+ Say-Verbose "Constructed primary payload URL: $PayloadURL"
+
+ return $PayloadURL
+}
+
+function Get-LegacyDownload-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) {
+ Say-Invocation $MyInvocation
+
+ if ($SharedRuntime) {
+ $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip"
+ }
+ else {
+ $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-dev-win-$CLIArchitecture.$SpecificVersion.zip"
+ }
+
+ Say-Verbose "Constructed legacy payload URL: $PayloadURL"
+
+ return $PayloadURL
+}
+
+function Get-User-Share-Path() {
+ Say-Invocation $MyInvocation
+
+ $InstallRoot = $env:DOTNET_INSTALL_DIR
+ if (!$InstallRoot) {
+ $InstallRoot = "$env:LocalAppData\Microsoft\dotnet"
+ }
+ return $InstallRoot
+}
+
+function Resolve-Installation-Path([string]$InstallDir) {
+ Say-Invocation $MyInvocation
+
+ if ($InstallDir -eq "") {
+ return Get-User-Share-Path
+ }
+ return $InstallDir
+}
+
+function Get-Version-Info-From-Version-File([string]$InstallRoot, [string]$RelativePathToVersionFile) {
+ Say-Invocation $MyInvocation
+
+ $VersionFile = Join-Path -Path $InstallRoot -ChildPath $RelativePathToVersionFile
+ Say-Verbose "Local version file: $VersionFile"
+
+ if (Test-Path $VersionFile) {
+ $VersionText = cat $VersionFile
+ Say-Verbose "Local version file text: $VersionText"
+ return Get-Version-Info-From-Version-Text $VersionText
+ }
+
+ Say-Verbose "Local version file not found."
+
+ return $null
+}
+
+function Is-Dotnet-Package-Installed([string]$InstallRoot, [string]$RelativePathToPackage, [string]$SpecificVersion) {
+ Say-Invocation $MyInvocation
+
+ $DotnetPackagePath = Join-Path -Path $InstallRoot -ChildPath $RelativePathToPackage | Join-Path -ChildPath $SpecificVersion
+ Say-Verbose "Is-Dotnet-Package-Installed: Path to a package: $DotnetPackagePath"
+ return Test-Path $DotnetPackagePath -PathType Container
+}
+
+function Get-Absolute-Path([string]$RelativeOrAbsolutePath) {
+ # Too much spam
+ # Say-Invocation $MyInvocation
+
+ return $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($RelativeOrAbsolutePath)
+}
+
+function Get-Path-Prefix-With-Version($path) {
+ $match = [regex]::match($path, $VersionRegEx)
+ if ($match.Success) {
+ return $entry.FullName.Substring(0, $match.Index + $match.Length)
+ }
+
+ return $null
+}
+
+function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([System.IO.Compression.ZipArchive]$Zip, [string]$OutPath) {
+ Say-Invocation $MyInvocation
+
+ $ret = @()
+ foreach ($entry in $Zip.Entries) {
+ $dir = Get-Path-Prefix-With-Version $entry.FullName
+ if ($dir -ne $null) {
+ $path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir)
+ if (-Not (Test-Path $path -PathType Container)) {
+ $ret += $dir
+ }
+ }
+ }
+
+ $ret = $ret | Sort-Object | Get-Unique
+
+ $values = ($ret | foreach { "$_" }) -join ";"
+ Say-Verbose "Directories to unpack: $values"
+
+ return $ret
+}
+
+# Example zip content and extraction algorithm:
+# Rule: files if extracted are always being extracted to the same relative path locally
+# .\
+# a.exe # file does not exist locally, extract
+# b.dll # file exists locally, override only if $OverrideFiles set
+# aaa\ # same rules as for files
+# ...
+# abc\1.0.0\ # directory contains version and exists locally
+# ... # do not extract content under versioned part
+# abc\asd\ # same rules as for files
+# ...
+# def\ghi\1.0.1\ # directory contains version and does not exist locally
+# ... # extract content
+function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
+ Say-Invocation $MyInvocation
+
+ Load-Assembly -Assembly System.IO.Compression.FileSystem
+ Set-Variable -Name Zip
+ try {
+ $Zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath)
+
+ $DirectoriesToUnpack = Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package -Zip $Zip -OutPath $OutPath
+
+ foreach ($entry in $Zip.Entries) {
+ $PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName
+ if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
+ $DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName)
+ $DestinationDir = Split-Path -Parent $DestinationPath
+ $OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath))
+ if ((-Not $DestinationPath.EndsWith("\")) -And $OverrideFiles) {
+ New-Item -ItemType Directory -Force -Path $DestinationDir | Out-Null
+ [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $DestinationPath, $OverrideNonVersionedFiles)
+ }
+ }
+ }
+ }
+ finally {
+ if ($Zip -ne $null) {
+ $Zip.Dispose()
+ }
+ }
+}
+
+function DownloadFile([Uri]$Uri, [string]$OutPath) {
+ $Stream = $null
+
+ try {
+ $Response = GetHTTPResponse -Uri $Uri
+ $Stream = $Response.Content.ReadAsStreamAsync().Result
+ $File = [System.IO.File]::Create($OutPath)
+ $Stream.CopyTo($File)
+ $File.Close()
+ }
+ finally {
+ if ($Stream -ne $null) {
+ $Stream.Dispose()
+ }
+ }
+}
+
+function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolderRelativePath) {
+ $BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath)
+ if (-Not $NoPath) {
+ Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process."
+ $env:path = "$BinPath;" + $env:path
+ }
+ else {
+ Say "Binaries of dotnet can be found in $BinPath"
+ }
+}
+
+$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
+$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version
+$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
+$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
+
+if ($DryRun) {
+ Say "Payload URLs:"
+ Say "Primary - $DownloadLink"
+ Say "Legacy - $LegacyDownloadLink"
+ Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
+ exit 0
+}
+
+$InstallRoot = Resolve-Installation-Path $InstallDir
+Say-Verbose "InstallRoot: $InstallRoot"
+
+$IsSdkInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage "sdk" -SpecificVersion $SpecificVersion
+Say-Verbose ".NET SDK installed? $IsSdkInstalled"
+if ($IsSdkInstalled) {
+ Say ".NET SDK version $SpecificVersion is already installed."
+ Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
+ exit 0
+}
+
+New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
+
+$installDrive = $((Get-Item $InstallRoot).PSDrive.Name);
+Write-Output "${installDrive}:";
+$free = Get-CimInstance -Class win32_logicaldisk | where Deviceid -eq "${installDrive}:"
+if ($free.Freespace / 1MB -le 100 ) {
+ Say "There is not enough disk space on drive ${installDrive}:"
+ exit 0
+}
+
+$ZipPath = [System.IO.Path]::GetTempFileName()
+Say-Verbose "Zip path: $ZipPath"
+Say "Downloading link: $DownloadLink"
+try {
+ DownloadFile -Uri $DownloadLink -OutPath $ZipPath
+}
+catch {
+ Say "Cannot download: $DownloadLink"
+ $DownloadLink = $LegacyDownloadLink
+ $ZipPath = [System.IO.Path]::GetTempFileName()
+ Say-Verbose "Legacy zip path: $ZipPath"
+ Say "Downloading legacy link: $DownloadLink"
+ DownloadFile -Uri $DownloadLink -OutPath $ZipPath
+}
+
+Say "Extracting zip from $DownloadLink"
+Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
+
+Remove-Item $ZipPath
+
+Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
+
+Say "Installation finished"
+exit 0
diff --git a/scripts/dotnet-install.sh b/scripts/dotnet-install.sh
new file mode 100644
index 0000000000..451525269e
--- /dev/null
+++ b/scripts/dotnet-install.sh
@@ -0,0 +1,815 @@
+#!/usr/bin/env bash
+# Copyright (c) .NET Foundation and contributors. All rights reserved.
+# Licensed under the MIT license. See LICENSE file in the project root for full license information.
+#
+
+# Stop script on NZEC
+set -e
+# Stop script if unbound variable found (use ${var:-} if intentional)
+set -u
+# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success
+# This is causing it to fail
+set -o pipefail
+
+# Use in the the functions: eval $invocation
+invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"'
+
+# standard output may be used as a return value in the functions
+# we need a way to write text on the screen in the functions so that
+# it won't interfere with the return value.
+# Exposing stream 3 as a pipe to standard output of the script itself
+exec 3>&1
+
+# Setup some colors to use. These need to work in fairly limited shells, like the Ubuntu Docker container where there are only 8 colors.
+# See if stdout is a terminal
+if [ -t 1 ]; then
+ # see if it supports colors
+ ncolors=$(tput colors)
+ if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then
+ bold="$(tput bold || echo)"
+ normal="$(tput sgr0 || echo)"
+ black="$(tput setaf 0 || echo)"
+ red="$(tput setaf 1 || echo)"
+ green="$(tput setaf 2 || echo)"
+ yellow="$(tput setaf 3 || echo)"
+ blue="$(tput setaf 4 || echo)"
+ magenta="$(tput setaf 5 || echo)"
+ cyan="$(tput setaf 6 || echo)"
+ white="$(tput setaf 7 || echo)"
+ fi
+fi
+
+say_err() {
+ printf "%b\n" "${red:-}dotnet_install: Error: $1${normal:-}" >&2
+}
+
+say() {
+ # using stream 3 (defined in the beginning) to not interfere with stdout of functions
+ # which may be used as return value
+ printf "%b\n" "${cyan:-}dotnet-install:${normal:-} $1" >&3
+}
+
+say_verbose() {
+ if [ "$verbose" = true ]; then
+ say "$1"
+ fi
+}
+
+get_os_download_name_from_platform() {
+ eval $invocation
+
+ platform="$1"
+ case "$platform" in
+ "centos.7")
+ echo "centos"
+ return 0
+ ;;
+ "debian.8")
+ echo "debian"
+ return 0
+ ;;
+ "fedora.23")
+ echo "fedora.23"
+ return 0
+ ;;
+ "fedora.24")
+ echo "fedora.24"
+ return 0
+ ;;
+ "opensuse.13.2")
+ echo "opensuse.13.2"
+ return 0
+ ;;
+ "opensuse.42.1")
+ echo "opensuse.42.1"
+ return 0
+ ;;
+ "rhel.7"*)
+ echo "rhel"
+ return 0
+ ;;
+ "ubuntu.14.04")
+ echo "ubuntu"
+ return 0
+ ;;
+ "ubuntu.16.04")
+ echo "ubuntu.16.04"
+ return 0
+ ;;
+ "ubuntu.16.10")
+ echo "ubuntu.16.10"
+ return 0
+ ;;
+ "alpine.3.4.3")
+ echo "alpine"
+ return 0
+ ;;
+ esac
+ return 1
+}
+
+get_current_os_name() {
+ eval $invocation
+
+ local uname=$(uname)
+ if [ "$uname" = "Darwin" ]; then
+ echo "osx"
+ return 0
+ else
+ if [ "$uname" = "Linux" ]; then
+ echo "linux"
+ return 0
+ fi
+ fi
+
+ say_err "OS name could not be detected: $ID.$VERSION_ID"
+ return 1
+}
+
+get_distro_specific_os_name() {
+ eval $invocation
+
+ local uname=$(uname)
+ if [ "$uname" = "Darwin" ]; then
+ echo "osx"
+ return 0
+ elif [ -n "$runtime_id" ]; then
+ echo $(get_os_download_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}")
+ return 0
+ else
+ if [ -e /etc/os-release ]; then
+ . /etc/os-release
+ os=$(get_os_download_name_from_platform "$ID.$VERSION_ID" || echo "")
+ if [ -n "$os" ]; then
+ echo "$os"
+ return 0
+ fi
+ fi
+ fi
+
+ say_verbose "Distribution specific OS name and version could not be detected: $ID.$VERSION_ID"
+ return 1
+}
+
+machine_has() {
+ eval $invocation
+
+ hash "$1" > /dev/null 2>&1
+ return $?
+}
+
+
+check_min_reqs() {
+ local hasMinimum=false
+ if machine_has "curl"; then
+ hasMinimum=true
+ elif machine_has "wget"; then
+ hasMinimum=true
+ fi
+
+ if [ "$hasMinimum" = "false" ]; then
+ say_err "curl (recommended) or wget are required to download dotnet. Install missing prerequisite to proceed."
+ return 1
+ fi
+ return 0
+}
+
+check_pre_reqs() {
+ eval $invocation
+
+ local failing=false;
+
+ if [ "${DOTNET_INSTALL_SKIP_PREREQS:-}" = "1" ]; then
+ return 0
+ fi
+
+ if [ "$(uname)" = "Linux" ]; then
+ if ! [ -x "$(command -v ldconfig)" ]; then
+ echo "ldconfig is not in PATH, trying /sbin/ldconfig."
+ LDCONFIG_COMMAND="/sbin/ldconfig"
+ else
+ LDCONFIG_COMMAND="ldconfig"
+ fi
+
+ [ -z "$($LDCONFIG_COMMAND -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true
+ [ -z "$($LDCONFIG_COMMAND -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && failing=true
+ [ -z "$($LDCONFIG_COMMAND -p | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && failing=true
+ fi
+
+ if [ "$failing" = true ]; then
+ return 1
+ fi
+
+ return 0
+}
+
+# args:
+# input - $1
+to_lowercase() {
+ #eval $invocation
+
+ echo "$1" | tr '[:upper:]' '[:lower:]'
+ return 0
+}
+
+# args:
+# input - $1
+remove_trailing_slash() {
+ #eval $invocation
+
+ local input=${1:-}
+ echo "${input%/}"
+ return 0
+}
+
+# args:
+# input - $1
+remove_beginning_slash() {
+ #eval $invocation
+
+ local input=${1:-}
+ echo "${input#/}"
+ return 0
+}
+
+# args:
+# root_path - $1
+# child_path - $2 - this parameter can be empty
+combine_paths() {
+ eval $invocation
+
+ # TODO: Consider making it work with any number of paths. For now:
+ if [ ! -z "${3:-}" ]; then
+ say_err "combine_paths: Function takes two parameters."
+ return 1
+ fi
+
+ local root_path=$(remove_trailing_slash $1)
+ local child_path=$(remove_beginning_slash ${2:-})
+ say_verbose "combine_paths: root_path=$root_path"
+ say_verbose "combine_paths: child_path=$child_path"
+ echo "$root_path/$child_path"
+ return 0
+}
+
+get_machine_architecture() {
+ eval $invocation
+
+ # Currently the only one supported
+ echo "x64"
+ return 0
+}
+
+# args:
+# architecture - $1
+get_normalized_architecture_from_architecture() {
+ eval $invocation
+
+ local architecture=$(to_lowercase $1)
+ case $architecture in
+ \)
+ echo "$(get_normalized_architecture_from_architecture $(get_machine_architecture))"
+ return 0
+ ;;
+ amd64|x64)
+ echo "x64"
+ return 0
+ ;;
+ x86)
+ say_err "Architecture \`x86\` currently not supported"
+ return 1
+ ;;
+ esac
+
+ say_err "Architecture \`$architecture\` not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues"
+ return 1
+}
+
+# version_info is a conceptual two line string representing commit hash and 4-part version
+# format:
+# Line 1: # commit_hash
+# Line 2: # 4-part version
+
+# args:
+# version_text - stdin
+get_version_from_version_info() {
+ eval $invocation
+
+ cat | tail -n 1
+ return 0
+}
+
+# args:
+# version_text - stdin
+get_commit_hash_from_version_info() {
+ eval $invocation
+
+ cat | head -n 1
+ return 0
+}
+
+# args:
+# install_root - $1
+# relative_path_to_package - $2
+# specific_version - $3
+is_dotnet_package_installed() {
+ eval $invocation
+
+ local install_root=$1
+ local relative_path_to_package=$2
+ local specific_version=${3//[$'\t\r\n']}
+
+ local dotnet_package_path=$(combine_paths $(combine_paths $install_root $relative_path_to_package) $specific_version)
+ say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path"
+
+ if [ -d "$dotnet_package_path" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+# args:
+# azure_feed - $1
+# channel - $2
+# normalized_architecture - $3
+get_latest_version_info() {
+ eval $invocation
+
+ local azure_feed=$1
+ local channel=$2
+ local normalized_architecture=$3
+ local coherent=$4
+
+ local version_file_url=null
+ if [ "$shared_runtime" = true ]; then
+ version_file_url="$uncached_feed/Runtime/$channel/latest.version"
+ else
+ if [ "$coherent" = true ]; then
+ version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version"
+ else
+ version_file_url="$uncached_feed/Sdk/$channel/latest.version"
+ fi
+ fi
+ say_verbose "get_latest_version_info: latest url: $version_file_url"
+
+ download $version_file_url
+ return $?
+}
+
+# args:
+# azure_feed - $1
+# channel - $2
+# normalized_architecture - $3
+# version - $4
+get_specific_version_from_version() {
+ eval $invocation
+
+ local azure_feed=$1
+ local channel=$2
+ local normalized_architecture=$3
+ local version=$(to_lowercase $4)
+
+ case $version in
+ latest)
+ local version_info
+ version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture false)" || return 1
+ say_verbose "get_specific_version_from_version: version_info=$version_info"
+ echo "$version_info" | get_version_from_version_info
+ return 0
+ ;;
+ coherent)
+ local version_info
+ version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture true)" || return 1
+ say_verbose "get_specific_version_from_version: version_info=$version_info"
+ echo "$version_info" | get_version_from_version_info
+ return 0
+ ;;
+ *)
+ echo $version
+ return 0
+ ;;
+ esac
+}
+
+# args:
+# azure_feed - $1
+# channel - $2
+# normalized_architecture - $3
+# specific_version - $4
+construct_download_link() {
+ eval $invocation
+
+ local azure_feed=$1
+ local channel=$2
+ local normalized_architecture=$3
+ local specific_version=${4//[$'\t\r\n']}
+
+ local osname
+ osname=$(get_current_os_name) || return 1
+
+ local download_link=null
+ if [ "$shared_runtime" = true ]; then
+ download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz"
+ else
+ download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz"
+ fi
+
+ echo "$download_link"
+ return 0
+}
+
+# args:
+# azure_feed - $1
+# channel - $2
+# normalized_architecture - $3
+# specific_version - $4
+construct_legacy_download_link() {
+ eval $invocation
+
+ local azure_feed=$1
+ local channel=$2
+ local normalized_architecture=$3
+ local specific_version=${4//[$'\t\r\n']}
+
+ local distro_specific_osname
+ distro_specific_osname=$(get_distro_specific_os_name) || return 1
+
+ local legacy_download_link=null
+ if [ "$shared_runtime" = true ]; then
+ legacy_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
+ else
+ legacy_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
+ fi
+
+ echo "$legacy_download_link"
+ return 0
+}
+
+get_user_install_path() {
+ eval $invocation
+
+ if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then
+ echo $DOTNET_INSTALL_DIR
+ else
+ echo "$HOME/.dotnet"
+ fi
+ return 0
+}
+
+# args:
+# install_dir - $1
+resolve_installation_path() {
+ eval $invocation
+
+ local install_dir=$1
+ if [ "$install_dir" = "" ]; then
+ local user_install_path=$(get_user_install_path)
+ say_verbose "resolve_installation_path: user_install_path=$user_install_path"
+ echo "$user_install_path"
+ return 0
+ fi
+
+ echo "$install_dir"
+ return 0
+}
+
+# args:
+# install_root - $1
+get_installed_version_info() {
+ eval $invocation
+
+ local install_root=$1
+ local version_file=$(combine_paths "$install_root" "$local_version_file_relative_path")
+ say_verbose "Local version file: $version_file"
+ if [ ! -z "$version_file" ] | [ -r "$version_file" ]; then
+ local version_info="$(cat $version_file)"
+ echo "$version_info"
+ return 0
+ fi
+
+ say_verbose "Local version file not found."
+ return 0
+}
+
+# args:
+# relative_or_absolute_path - $1
+get_absolute_path() {
+ eval $invocation
+
+ local relative_or_absolute_path=$1
+ echo $(cd $(dirname "$1") && pwd -P)/$(basename "$1")
+ return 0
+}
+
+# args:
+# input_files - stdin
+# root_path - $1
+# out_path - $2
+# override - $3
+copy_files_or_dirs_from_list() {
+ eval $invocation
+
+ local root_path=$(remove_trailing_slash $1)
+ local out_path=$(remove_trailing_slash $2)
+ local override=$3
+ local override_switch=$(if [ "$override" = false ]; then printf -- "-n"; fi)
+
+ cat | uniq | while read -r file_path; do
+ local path=$(remove_beginning_slash ${file_path#$root_path})
+ local target=$out_path/$path
+ if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then
+ mkdir -p $out_path/$(dirname $path)
+ cp -R $override_switch $root_path/$path $target
+ fi
+ done
+}
+
+# args:
+# zip_path - $1
+# out_path - $2
+extract_dotnet_package() {
+ eval $invocation
+
+ local zip_path=$1
+ local out_path=$2
+
+ local temp_out_path=$(mktemp -d $temporary_file_template)
+
+ local failed=false
+ tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true
+
+ local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
+ find $temp_out_path -type f | grep -Eo $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false
+ find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path true
+
+ rm -rf $temp_out_path
+
+ if [ "$failed" = true ]; then
+ say_err "Extraction failed"
+ return 1
+ fi
+}
+
+# args:
+# remote_path - $1
+# [out_path] - $2 - stdout if not provided
+download() {
+ eval $invocation
+
+ local remote_path=$1
+ local out_path=${2:-}
+
+ local failed=false
+ if machine_has "curl"; then
+ downloadcurl $remote_path $out_path || failed=true
+ elif machine_has "wget"; then
+ downloadwget $remote_path $out_path || failed=true
+ else
+ failed=true
+ fi
+ if [ "$failed" = true ]; then
+ say_verbose "Download failed: $remote_path"
+ return 1
+ fi
+ return 0
+}
+
+downloadcurl() {
+ eval $invocation
+ local remote_path=$1
+ local out_path=${2:-}
+
+ local failed=false
+ if [ -z "$out_path" ]; then
+ curl --retry 10 -sSL -f --create-dirs $remote_path || failed=true
+ else
+ curl --retry 10 -sSL -f --create-dirs -o $out_path $remote_path || failed=true
+ fi
+ if [ "$failed" = true ]; then
+ say_verbose "Curl download failed"
+ return 1
+ fi
+ return 0
+}
+
+downloadwget() {
+ eval $invocation
+ local remote_path=$1
+ local out_path=${2:-}
+
+ local failed=false
+ if [ -z "$out_path" ]; then
+ wget -q --tries 10 $remote_path || failed=true
+ else
+ wget -v --tries 10 -O $out_path $remote_path || failed=true
+ fi
+ if [ "$failed" = true ]; then
+ say_verbose "Wget download failed"
+ return 1
+ fi
+ return 0
+}
+
+calculate_vars() {
+ eval $invocation
+ valid_legacy_download_link=true
+
+ normalized_architecture=$(get_normalized_architecture_from_architecture "$architecture")
+ say_verbose "normalized_architecture=$normalized_architecture"
+
+ specific_version=$(get_specific_version_from_version $azure_feed $channel $normalized_architecture $version)
+ say_verbose "specific_version=$specific_version"
+ if [ -z "$specific_version" ]; then
+ say_err "Could not get version information."
+ return 1
+ fi
+
+ download_link=$(construct_download_link $azure_feed $channel $normalized_architecture $specific_version)
+ say_verbose "download_link=$download_link"
+
+ legacy_download_link=$(construct_legacy_download_link $azure_feed $channel $normalized_architecture $specific_version) || valid_legacy_download_link=false
+
+ if [ "$valid_legacy_download_link" = true ]; then
+ say_verbose "legacy_download_link=$legacy_download_link"
+ else
+ say_verbose "Cound not construct a legacy_download_link; omitting..."
+ fi
+
+ install_root=$(resolve_installation_path $install_dir)
+ say_verbose "install_root=$install_root"
+}
+
+install_dotnet() {
+ eval $invocation
+ local download_failed=false
+
+ if is_dotnet_package_installed $install_root "sdk" $specific_version; then
+ say ".NET SDK version $specific_version is already installed."
+ return 0
+ fi
+
+ mkdir -p $install_root
+ zip_path=$(mktemp $temporary_file_template)
+ say_verbose "Zip path: $zip_path"
+
+ say "Downloading link: $download_link"
+ download "$download_link" $zip_path || download_failed=true
+
+ # if the download fails, download the legacy_download_link
+ if [ "$download_failed" = true ] && [ "$valid_legacy_download_link" = true ]; then
+ say "Cannot download: $download_link"
+ download_link=$legacy_download_link
+ zip_path=$(mktemp $temporary_file_template)
+ say_verbose "Legacy zip path: $zip_path"
+ say "Downloading legacy link: $download_link"
+ download "$download_link" $zip_path
+ fi
+
+ say "Extracting zip from $download_link"
+ extract_dotnet_package $zip_path $install_root
+
+ return 0
+}
+
+local_version_file_relative_path="/.version"
+bin_folder_relative_path=""
+temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX"
+
+channel="LTS"
+version="Latest"
+install_dir=""
+architecture=""
+dry_run=false
+no_path=false
+azure_feed="https://dotnetcli.azureedge.net/dotnet"
+uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet"
+verbose=false
+shared_runtime=false
+runtime_id=""
+
+while [ $# -ne 0 ]
+do
+ name=$1
+ case $name in
+ -c|--channel|-[Cc]hannel)
+ shift
+ channel=$1
+ ;;
+ -v|--version|-[Vv]ersion)
+ shift
+ version="$1"
+ ;;
+ -i|--install-dir|-[Ii]nstall[Dd]ir)
+ shift
+ install_dir="$1"
+ ;;
+ --arch|--architecture|-[Aa]rch|-[Aa]rchitecture)
+ shift
+ architecture="$1"
+ ;;
+ --shared-runtime|-[Ss]hared[Rr]untime)
+ shared_runtime=true
+ ;;
+ --dry-run|-[Dd]ry[Rr]un)
+ dry_run=true
+ ;;
+ --no-path|-[Nn]o[Pp]ath)
+ no_path=true
+ ;;
+ --verbose|-[Vv]erbose)
+ verbose=true
+ ;;
+ --azure-feed|-[Aa]zure[Ff]eed)
+ shift
+ azure_feed="$1"
+ ;;
+ --uncached-feed|-[Uu]ncached[Ff]eed)
+ shift
+ uncached_feed="$1"
+ ;;
+ --runtime-id|-[Rr]untime[Ii]d)
+ shift
+ runtime_id="$1"
+ ;;
+ -?|--?|-h|--help|-[Hh]elp)
+ script_name="$(basename $0)"
+ echo ".NET Tools Installer"
+ echo "Usage: $script_name [-c|--channel ] [-v|--version ] [-p|--prefix ]"
+ echo " $script_name -h|-?|--help"
+ echo ""
+ echo "$script_name is a simple command line interface for obtaining dotnet cli."
+ echo ""
+ echo "Options:"
+ echo " -c,--channel Download from the CHANNEL specified, Defaults to \`$channel\`."
+ echo " -Channel"
+ echo " Possible values:"
+ echo " - Current - most current release"
+ echo " - LTS - most current supported release"
+ echo " - 2-part version in a format A.B - represents a specific release"
+ echo " examples: 2.0; 1.0"
+ echo " - Branch name"
+ echo " examples: release/2.0.0; Master"
+ echo " -v,--version Use specific VERSION, Defaults to \`$version\`."
+ echo " -Version"
+ echo " Possible values:"
+ echo " - latest - most latest build on specific channel"
+ echo " - coherent - most latest coherent build on specific channel"
+ echo " coherent applies only to SDK downloads"
+ echo " - 3-part version in a format A.B.C - represents specific version of build"
+ echo " examples: 2.0.0-preview2-006120; 1.1.0"
+ echo " -i,--install-dir Install under specified location (see Install Location below)"
+ echo " -InstallDir"
+ echo " --architecture Architecture of .NET Tools. Currently only x64 is supported."
+ echo " --arch,-Architecture,-Arch"
+ echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK."
+ echo " -SharedRuntime"
+ echo " --dry-run,-DryRun Do not perform installation. Display download link."
+ echo " --no-path, -NoPath Do not set PATH for the current process."
+ echo " --verbose,-Verbose Display diagnostics information."
+ echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user."
+ echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user."
+ echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
+ echo " -RuntimeId"
+ echo " -?,--?,-h,--help,-Help Shows this help message"
+ echo ""
+ echo "Install Location:"
+ echo " Location is chosen in following order:"
+ echo " - --install-dir option"
+ echo " - Environmental variable DOTNET_INSTALL_DIR"
+ echo " - $HOME/.dotnet"
+ exit 0
+ ;;
+ *)
+ say_err "Unknown argument \`$name\`"
+ exit 1
+ ;;
+ esac
+
+ shift
+done
+
+check_min_reqs
+calculate_vars
+
+if [ "$dry_run" = true ]; then
+ say "Payload URL: $download_link"
+ if [ "$valid_legacy_download_link" = true ]; then
+ say "Legacy payload URL: $legacy_download_link"
+ fi
+ say "Repeatable invocation: ./$(basename $0) --version $specific_version --channel $channel --install-dir $install_dir"
+ exit 0
+fi
+
+check_pre_reqs
+install_dotnet
+
+bin_path=$(get_absolute_path $(combine_paths $install_root $bin_folder_relative_path))
+if [ "$no_path" = false ]; then
+ say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script."
+ export PATH=$bin_path:$PATH
+else
+ say "Binaries of dotnet can be found in $bin_path"
+fi
+
+say "Installation finished successfully."
diff --git a/src/FSharpSource.BuildFromSource.targets b/src/FSharpSource.BuildFromSource.targets
new file mode 100644
index 0000000000..5b658bd0c1
--- /dev/null
+++ b/src/FSharpSource.BuildFromSource.targets
@@ -0,0 +1,150 @@
+
+
+
+
+
+ 4.4.1.0
+ $(MSBuildThisFileDirectory)../BuildFromSource/$(Configuration)/bin
+
+ true
+ true
+ false
+
+
+ $(DefineConstants);STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
+ $(MSBuildThisFileDirectory)buildtools/keys/MSFT.snk
+ true
+ $(OtherFlags) --publicsign --keyfile:$(KeyFile)
+ $(OtherFlags) --nocopyfsharpcore
+
+ dotnet
+ dotnet.exe
+ $(MSBuildThisFileDirectory)../Tools/dotnet20/$(DotNetExe)
+ $(MSBuildBinPath)/../../$(DotNetExe)
+
+
+ $(IntermediateOutputFile)\BuildVersionFile.props
+
+
+
+
+ coreclr
+ net40
+
+
+
+
+
+
+
+
+
+
+ $([System.Text.RegularExpressions.Regex]::Replace($([System.IO.File]::ReadAllText("%(CopyAndSubstituteText.FullPath)")), "%(CopyAndSubstituteText.Pattern1)", "%(CopyAndSubstituteText.Replacement1)"))
+
+
+ $([System.Text.RegularExpressions.Regex]::Replace($(FileText), "%(CopyAndSubstituteText.Pattern2)", "%(CopyAndSubstituteText.Replacement2)"))
+
+
+
+
+
+
+
+
+
+
+
+ $(MSBuildThisFileDirectory)../Tools/fssrgen/fssrgen.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(FsSrGen.Filename)
+ Resx
+ false
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ $(MSBuildThisFileDirectory)../Tools/fslex/fslex.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(MSBuildThisFileDirectory)../Tools/fsyacc/fsyacc.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/FSharpSource.Profiles.targets b/src/FSharpSource.Profiles.targets
new file mode 100644
index 0000000000..6ce6354bb3
--- /dev/null
+++ b/src/FSharpSource.Profiles.targets
@@ -0,0 +1,61 @@
+
+
+
+
+
+ $(DefineConstants);CROSS_PLATFORM_COMPILER
+ $(DefineConstants);PREFERRED_UI_LANG
+ $(DefineConstants);ENABLE_MONO_SUPPORT
+ $(DefineConstants);BE_SECURITY_TRANSPARENT
+ $(DefineConstants);FX_LCIDFROMCODEPAGE
+
+
+
+ $(DefineConstants);FX_PORTABLE_OR_NETSTANDARD
+ $(DefineConstants);NETSTANDARD1_6
+ $(DefineConstants);PREFERRED_UI_LANG
+ $(DefineConstants);FX_NO_APP_DOMAINS
+ $(DefineConstants);FX_NO_ARRAY_LONG_LENGTH
+ $(DefineConstants);FX_NO_BEGINEND_READWRITE
+ $(DefineConstants);FX_NO_BINARY_SERIALIZATION
+ $(DefineConstants);FX_NO_CONVERTER
+ $(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE
+ $(DefineConstants);FX_NO_CORHOST_SIGNER
+ $(DefineConstants);FX_NO_CRYPTO
+ $(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE
+ $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS
+ $(DefineConstants);FX_NO_HEAPTERMINATION
+ $(DefineConstants);FX_NO_LINKEDRESOURCES
+ $(DefineConstants);FX_NO_LOADER_OPTIMIZATION
+ $(DefineConstants);FX_NO_SIMPLIFIED_LOADER
+ $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START
+ $(DefineConstants);FX_NO_PDB_READER
+ $(DefineConstants);FX_NO_PDB_WRITER
+ $(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES
+ $(DefineConstants);FX_NO_REFLECTION_ONLY
+ $(DefineConstants);FX_NO_RUNTIMEENVIRONMENT
+ $(DefineConstants);FX_NO_SECURITY_PERMISSIONS
+ $(DefineConstants);FX_NO_SERVERCODEPAGES
+ $(DefineConstants);FX_NO_SYMBOLSTORE
+ $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION
+ $(DefineConstants);FX_NO_THREAD
+ $(DefineConstants);FX_NO_THREADABORT
+ $(DefineConstants);FX_NO_WAITONE_MILLISECONDS
+ $(DefineConstants);FX_NO_WEB_CLIENT
+ $(DefineConstants);FX_NO_WIN_REGISTRY
+ $(DefineConstants);FX_NO_WINFORMS
+ $(DefineConstants);FX_REDUCED_EXCEPTIONS
+ $(DefineConstants);FX_REDUCED_CONSOLE
+ $(DefineConstants);FX_RESHAPED_REFEMIT
+ $(DefineConstants);FX_RESHAPED_CONSOLE
+ $(DefineConstants);FX_RESHAPED_GLOBALIZATION
+ $(DefineConstants);FX_RESHAPED_REFLECTION
+ $(DefineConstants);FX_JITTRACKING_ISSUE
+ $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER
+ $(DefineConstants);FX_RESHAPED_REFLECTION_CORECLR
+ $(DefineConstants);FX_RESHAPED_MSBUILD
+ $(DefineConstants);FSI_TODO_NETCORE
+ $(OtherFlags) --simpleresolution
+
+
+
diff --git a/src/FSharpSource.Settings.targets b/src/FSharpSource.Settings.targets
new file mode 100644
index 0000000000..c1a0b2935b
--- /dev/null
+++ b/src/FSharpSource.Settings.targets
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+ Debug
+ $(ConfigurationGroup)
+ $(TargetGroup)_$(Configuration)
+ $(OSGroup)_$(Configuration)
+
+
+
+ Debug
+ Release
+ Debug
+
+
+
+
+ true
+ net40
+
+
+ net40
+ FSharp
+ true
+ true
+ true
+
+ false
+
+ 2.3.0-beta2-61719-01
+ 15.0
+ 15.0.26201
+ Microsoft.VSSDK.BuildTools.15.0.26201
+
+ 15.3.23
+ 15.3.15
+
+
+ obj\$(Configuration)\$(TargetDotnetProfile)\
+ obj\$(Configuration)\$(TargetDotnetProfile)\$(PortableProfileBeingReferenced)\
+
+ 4.1.19
+ 4.1.20
+ 4.1.21
+ 4.2.4
+
+
+
+ true
+ false
+ true
+ $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk
+ $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\bin
+ $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\Microsoft.VsSDK.targets
+ $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\inc
+ $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\schemas\VSIXManifestSchema.xsd
+
+
+
+
+ $(OtherFlags) --times
+ $(NoWarn);69;65;54;61;75
+
+
+
+
+ full
+
+ false
+ prompt
+ $(OtherFlags) --no-jit-optimize
+ true
+ DEBUG;TRACE;CODE_ANALYSIS;$(DefineConstants)
+ DEBUG=True,TRACE=True,CODE_ANALYSIS=True,$(DefineConstants)
+
+
+
+
+ pdbonly
+
+ true
+ false
+ prompt
+ TRACE;$(DefineConstants)
+ TRACE=True,$(DefineConstants)
+
+
+
+
+ full
+ true
+ DEBUG;NO_STRONG_NAMES;$(DefineConstants)
+
+
+
+
+ bin\$(Configuration)
+ 3
+
+
+
+ $(DefineConstants),VS_VERSION_DEV12=True
+ $(DefineConstants);VS_VERSION_DEV12
+ $(DefineConstants),VS_VERSION_DEV14=True
+ $(DefineConstants);VS_VERSION_DEV14
+ $(DefineConstants),VS_VERSION_DEV15=True
+ $(DefineConstants);VS_VERSION_DEV15
+
+ $(DefineConstants),VS_VERSION_DEV14=True
+ $(DefineConstants);VS_VERSION_DEV14
+
+
+
+
+ $([System.DateTime]::Now.ToString(`yyMMdd`))
+ 1.0.0
+ $(NuGetReleaseVersion)-rc
+ $(NuGetPreReleaseVersion)-$(BuildRevision.Trim())
+ $(MSBuildThisFileDirectory)..\packages
+ $(NUGET_PACKAGES)
+
+
+
+
+ $(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.6\build
+ $(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.6\build
+ fsi.exe
+ fslex.exe
+ fsyacc.exe
+
+
+
+ v12.0
+ 12.0.0.0
+
+
+
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools
+
+
+
+
+
+
diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets
new file mode 100644
index 0000000000..effcaf5a59
--- /dev/null
+++ b/src/FSharpSource.targets
@@ -0,0 +1,398 @@
+
+
+
+
+
+ 4.4.1.0
+
+
+
+
+
+ false
+ true
+
+
+
+
+
+
+
+
+ true
+ false
+ $(FSCoreVersion)
+ fs
+
+
+
+
+
+ $(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\test.snk"
+ STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)
+ true
+ $(FSCoreVersion)
+ fs
+
+
+
+
+
+
+ $(OtherFlags) --delaysign+
+ $(OtherFlags) --publicsign+
+ $(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"
+ STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)
+ true
+ $(FSCoreVersion)
+
+ 15.4.1.0
+ fs
+
+
+
+
+
+
+
+ true
+ $(FSharpSourcesRoot)\fsharp\msft.pubkey
+ STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)
+ true
+ true
+ $(FSCoreVersion)
+ fs
+
+
+
+
+
+
+
+ NO_STRONG_NAMES;$(DefineConstants)
+ $(FSCoreVersion)
+ fs
+
+
+
+
+
+ $(OtherFlags) --version:"$(MicroBuildAssemblyVersion)"
+
+
+
+ $(IntermediateOutputPath)source_link.json
+
+
+
+ NO_STRONG_NAMES;$(DefineConstants)
+
+
+
+ MSBUILD_AT_LEAST_14;$(DefineConstants)
+
+
+
+
+ false
+
+
+
+ $(FSharpSourcesRoot)\..\packages
+ 3.5.0
+ 3.5.0.0
+ $(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45
+ $(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\
+ 2.6.2
+ 2.6.2.0
+ $(FSharpSourcesRoot)\..\packages\FsCheck.$(FsCheckVersion)\lib\
+
+
+
+
+
+ v4.5
+
+
+
+
+
+ netcore
+
+ v5.0
+ false
+ .NETStandard,Version=v1.6
+ true
+
+
+
+ bin\$(Configuration)\netcoreapp1.0
+ true
+ true
+ win7-x64
+ $(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\$(AssemblyName)
+ Exe
+ .dll
+
+
+
+ true
+ $(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\FSC
+ true
+ $(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\FSC
+
+
+
+
+ $(TargetDotnetProfile)
+ fsharp30\$(TargetDotnetProfile)
+ fsharp31\$(TargetDotnetProfile)
+ fsharp40\$(TargetDotnetProfile)
+ obj\$(TargetFrameworkOutputDirectory)\
+
+
+
+
+
+ $(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin
+
+ $(FSharpSourcesRoot)\..\Tools\dotnet20\sdk\2.0.0-preview2-006502\FSharp
+ ..\packages\FSharp.Compiler.Tools.4.1.23\tools\Microsoft.FSharp.Targets
+
+
+ $(FSharpSourcesRoot)\..\Tools\dotnet20
+ dotnet.exe
+ dotnet
+ $(FSharpNetCoreLkgPath)\fsc.exe
+
+
+
+
+
+ $(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin
+ ..\packages\FSharp.Compiler.Tools.4.1.23\tools\Microsoft.FSharp.Targets
+
+
+
+
+
+ $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFrameworkOutputDirectory)\bin
+ $(FSharpSourcesRoot)\..\Proto\$(ProtoFlavour)\bin
+ fsc-proto.exe
+ ..\Proto\$(ProtoFlavour)\bin\Microsoft.Portable.FSharp-proto.targets
+
+
+
+
+
+ $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFrameworkOutputDirectory)\bin
+ $(FSharpSourcesRoot)\..\Proto\$(ProtoFlavour)\bin
+ fsc-proto.exe
+ ..\Proto\$(ProtoFlavour)\bin\Microsoft.FSharp-proto.targets
+
+
+
+
+
+ ValidateBuildTools;$(CompileDependsOn)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(NUGET_PACKAGES)
+
+ $(FSharpSourcesRoot)\..\.nuget\
+ -ConfigFile "$(NuGetConfigFile)"
+ "$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config"
+ "$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config"
+
+
+ true
+
+
+
+
+
+ $(OutputPath)$(AssemblyName).xml
+
+
+
+ https://github.com/Microsoft/visualfsharp/blob/master/License.txt
+ https://github.com/Microsoft/visualfsharp
+ $(NuGetPerBuildPreReleaseVersion)
+ Microsoft
+ Visual F# Compiler FSharp coreclr functional programming
+
+
+
+
+ $(CompileDependsOn);CopyAndSubstituteTextFiles
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory.TrimEnd("\"))))
+ $(SrcRootDirectory.Replace("\", "\\"))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $([System.IO.Path]::GetDirectoryName($(BuildVersionFilePath)))
+
+
+
+
+
+
+
+ $([System.IO.Path]::GetDirectoryName($(BuildVersionFilePath)))
+ $(NuGetPerBuildPreReleaseVersion)
+ $([MSBuild]::Add($(PackageVersionMinor), 1))
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/absil/il.fs b/src/absil/il.fs
index 956afc6368..8d4bc02132 100644
--- a/src/absil/il.fs
+++ b/src/absil/il.fs
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-module (*internal*) Microsoft.FSharp.Compiler.AbstractIL.IL
+module Microsoft.FSharp.Compiler.AbstractIL.IL
#nowarn "49"
#nowarn "343" // The type 'ILAssemblyRef' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'.
@@ -52,15 +52,18 @@ let lazyMap f (x:Lazy<_>) =
[]
type PrimaryAssembly =
| Mscorlib
- | DotNetCore
+ | System_Runtime
+ | NetStandard
member this.Name =
match this with
| Mscorlib -> "mscorlib"
- | DotNetCore -> "System.Runtime"
+ | System_Runtime -> "System.Runtime"
+ | NetStandard -> "netstandard"
static member IsSomePrimaryAssembly n =
n = PrimaryAssembly.Mscorlib.Name
- || n = PrimaryAssembly.DotNetCore.Name
+ || n = PrimaryAssembly.System_Runtime.Name
+ || n = PrimaryAssembly.NetStandard.Name
// --------------------------------------------------------------------
// Utilities: type names
@@ -561,8 +564,7 @@ type ILTypeRef =
member x.ApproxId = x.hashCode
member x.AsBoxedType (tspec:ILTypeSpec) =
- match List.length tspec.tspecInst with
- | 0 ->
+ if isNil tspec.tspecInst then
let v = x.asBoxedType
match box v with
| null ->
@@ -570,7 +572,8 @@ type ILTypeRef =
x.asBoxedType <- r
r
| _ -> v
- | _ -> ILType.Boxed tspec
+ else
+ ILType.Boxed tspec
override x.GetHashCode() = x.hashCode
override x.Equals(yobj) =
@@ -1072,6 +1075,7 @@ type ILMethodBody =
{ IsZeroInit: bool;
MaxStack: int32;
NoInlining: bool;
+ AggressiveInlining: bool;
Locals: ILLocals;
Code: ILCode;
SourceMarker: ILSourceMarker option }
@@ -1371,6 +1375,7 @@ type ILMethodDef =
IsPreserveSig: bool;
IsMustRun: bool;
IsNoInline: bool;
+ IsAggressiveInline : bool
GenericParams: ILGenericParameterDefs;
CustomAttrs: ILAttributes; }
member x.ParameterTypes = typesOfILParams x.Parameters
@@ -1588,7 +1593,7 @@ and [] ILTypeDefs(f : unit -> (string list * string * ILAttributes * Laz
t)
member x.AsArray = [| for (_,_,_,ltd) in array.Value -> ltd.Force() |]
- member x.AsList = x.AsArray |> Array.toList
+ member x.AsList = [ for (_,_,_,ltd) in array.Value -> ltd.Force() ]
interface IEnumerable with
member x.GetEnumerator() = ((x :> IEnumerable).GetEnumerator() :> IEnumerator)
@@ -2276,6 +2281,7 @@ let mkILMethodBody (zeroinit,locals,maxstack,code,tag) : ILMethodBody =
{ IsZeroInit=zeroinit
MaxStack=maxstack
NoInlining=false
+ AggressiveInlining=false
Locals= locals
Code= code
SourceMarker=tag }
@@ -2311,6 +2317,7 @@ let mkILCtor (access,args,impl) =
IsUnmanagedExport=false;
IsSynchronized=false;
IsNoInline=false;
+ IsAggressiveInline=false
IsMustRun=false;
IsPreserveSig=false;
CustomAttrs = emptyILCustomAttrs; }
@@ -2364,6 +2371,7 @@ let mkILStaticMethod (genparams,nm,access,args,ret,impl) =
IsUnmanagedExport=false;
IsSynchronized=false;
IsNoInline=false;
+ IsAggressiveInline=false;
IsMustRun=false;
IsPreserveSig=false; }
@@ -2393,6 +2401,7 @@ let mkILClassCtor impl =
IsUnmanagedExport=false;
IsSynchronized=false;
IsNoInline=false;
+ IsAggressiveInline=false
IsMustRun=false;
IsPreserveSig=false; }
@@ -2433,6 +2442,7 @@ let mkILGenericVirtualMethod (nm,access,genparams,actual_args,actual_ret,impl) =
IsUnmanagedExport=false;
IsSynchronized=false;
IsNoInline=false;
+ IsAggressiveInline=false
IsMustRun=false;
IsPreserveSig=false; }
@@ -2462,6 +2472,7 @@ let mkILGenericNonVirtualMethod (nm,access,genparams, actual_args,actual_ret, im
IsUnmanagedExport=false;
IsSynchronized=false;
IsNoInline=false;
+ IsAggressiveInline=false
IsMustRun=false;
IsPreserveSig=false; }
diff --git a/src/absil/il.fsi b/src/absil/il.fsi
index 3c9de895d0..11574eed33 100755
--- a/src/absil/il.fsi
+++ b/src/absil/il.fsi
@@ -2,7 +2,11 @@
/// The "unlinked" view of .NET metadata and code. Central to
/// to Abstract IL library
-module (*internal*) Microsoft.FSharp.Compiler.AbstractIL.IL
+#if COMPILER_PUBLIC_API
+module public Microsoft.FSharp.Compiler.AbstractIL.IL
+#else
+module internal Microsoft.FSharp.Compiler.AbstractIL.IL
+#endif
open Internal.Utilities
open System.Collections.Generic
@@ -10,7 +14,8 @@ open System.Collections.Generic
[]
type PrimaryAssembly =
| Mscorlib
- | DotNetCore
+ | System_Runtime
+ | NetStandard
member Name: string
@@ -799,9 +804,10 @@ type ILLocals = list
[]
type ILMethodBody =
{ IsZeroInit: bool;
- /// strictly speakin should be a uint16
+ /// strictly speaking should be a uint16
MaxStack: int32;
NoInlining: bool;
+ AggressiveInlining: bool;
Locals: ILLocals;
Code: ILCode;
SourceMarker: ILSourceMarker option }
@@ -850,6 +856,7 @@ type ILAttribute =
[]
type ILAttributes =
+ member AsArray : ILAttribute []
member AsList : ILAttribute list
/// Method parameters and return values.
@@ -1048,6 +1055,7 @@ type ILMethodDef =
/// .NET 2.0 feature: SafeHandle finalizer must be run.
IsMustRun: bool;
IsNoInline: bool;
+ IsAggressiveInline: bool;
GenericParams: ILGenericParameterDefs;
CustomAttrs: ILAttributes; }
diff --git a/src/absil/illib.fs b/src/absil/illib.fs
index 3a8d7d92d8..d3051cf477 100755
--- a/src/absil/illib.fs
+++ b/src/absil/illib.fs
@@ -1,6 +1,10 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-module (*internal*) Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
+#if COMPILER_PUBLIC_API
+module public Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
+#else
+module internal Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
+#endif
#nowarn "1178" // The struct, record or union type 'internal_instr_extension' is not structurally comparable because the type
@@ -21,6 +25,20 @@ let (>>>&) (x:int32) (n:int32) = int32 (uint32 x >>> n)
let notlazy v = Lazy<_>.CreateFromValue v
let inline isNil l = List.isEmpty l
+
+/// Returns true if the list has less than 2 elements. Otherwise false.
+let inline isNilOrSingleton l =
+ match l with
+ | []
+ | [_] -> true
+ | _ -> false
+
+/// Returns true if the list contains exactly 1 element. Otherwise false.
+let inline isSingleton l =
+ match l with
+ | [_] -> true
+ | _ -> false
+
let inline isNonNull x = not (isNull x)
let inline nonNull msg x = if isNull x then failwith ("null: " ^ msg) else x
let (===) x y = LanguagePrimitives.PhysicalEquality x y
@@ -265,7 +283,7 @@ module Option =
module List =
- let item n xs = List.nth xs n
+ //let item n xs = List.nth xs n
#if FX_RESHAPED_REFLECTION
open PrimReflectionAdapters
open Microsoft.FSharp.Core.ReflectionAdapters
@@ -431,17 +449,7 @@ module List =
match l with
| [] -> false
| h::t -> LanguagePrimitives.PhysicalEquality x h || memq x t
-
- // must be tail recursive
- let mapFold (f:'a -> 'b -> 'c * 'a) (s:'a) (l:'b list) : 'c list * 'a =
- match l with
- | [] -> [], s
- | [h] -> let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)
- let h',s' = f.Invoke(s, h)
- [h'], s'
- | _ ->
- List.mapFold f s l
-
+
// Not tail recursive
let rec mapFoldBack f l s =
match l with
@@ -469,7 +477,7 @@ module List =
| x::xs -> fhead x :: List.map ftail xs
let collectFold f s l =
- let l, s = mapFold f s l
+ let l, s = List.mapFold f s l
List.concat l, s
let collect2 f xs ys = List.concat (List.map2 f xs ys)
@@ -478,7 +486,7 @@ module List =
let iterSquared f xss = xss |> List.iter (List.iter f)
let collectSquared f xss = xss |> List.collect (List.collect f)
let mapSquared f xss = xss |> List.map (List.map f)
- let mapFoldSquared f z xss = mapFold (mapFold f) z xss
+ let mapFoldSquared f z xss = List.mapFold (List.mapFold f) z xss
let forallSquared f xss = xss |> List.forall (List.forall f)
let mapiSquared f xss = xss |> List.mapi (fun i xs -> xs |> List.mapi (fun j x -> f i j x))
let existsSquared f xss = xss |> List.exists (fun xs -> xs |> List.exists (fun x -> f x))
@@ -1074,6 +1082,42 @@ module Tables =
else
res <- f x; t.[x] <- res; res
+
+/// Interface that defines methods for comparing objects using partial equality relation
+type IPartialEqualityComparer<'T> =
+ inherit IEqualityComparer<'T>
+ /// Can the specified object be tested for equality?
+ abstract InEqualityRelation : 'T -> bool
+
+module IPartialEqualityComparer =
+ let On f (c: IPartialEqualityComparer<_>) =
+ { new IPartialEqualityComparer<_> with
+ member __.InEqualityRelation x = c.InEqualityRelation (f x)
+ member __.Equals(x, y) = c.Equals(f x, f y)
+ member __.GetHashCode x = c.GetHashCode(f x) }
+
+
+
+ // Wrapper type for use by the 'partialDistinctBy' function
+ []
+ type private WrapType<'T> = Wrap of 'T
+
+ // Like Seq.distinctBy but only filters out duplicates for some of the elements
+ let partialDistinctBy (per:IPartialEqualityComparer<'T>) seq =
+ let wper =
+ { new IPartialEqualityComparer> with
+ member __.InEqualityRelation (Wrap x) = per.InEqualityRelation (x)
+ member __.Equals(Wrap x, Wrap y) = per.Equals(x, y)
+ member __.GetHashCode (Wrap x) = per.GetHashCode(x) }
+ // Wrap a Wrap _ around all keys in case the key type is itself a type using null as a representation
+ let dict = Dictionary,obj>(wper)
+ seq |> List.filter (fun v ->
+ let key = Wrap(v)
+ if (per.InEqualityRelation(v)) then
+ if dict.ContainsKey(key) then false else (dict.[key] <- null; true)
+ else true)
+
+
//-------------------------------------------------------------------------
// Library: Name maps
//------------------------------------------------------------------------
diff --git a/src/absil/ilprint.fs b/src/absil/ilprint.fs
index 75cc2a0bf9..79c4fe0b91 100755
--- a/src/absil/ilprint.fs
+++ b/src/absil/ilprint.fs
@@ -846,10 +846,11 @@ let goutput_mdef env os md =
output_string os " ";
(goutput_params menv) os md.Parameters;
output_string os " ";
- if md.IsSynchronized then output_string os "synchronized ";
- if md.IsMustRun then output_string os "/* mustrun */ ";
- if md.IsPreserveSig then output_string os "preservesig ";
- if md.IsNoInline then output_string os "noinlining ";
+ if md.IsSynchronized then output_string os "synchronized "
+ if md.IsMustRun then output_string os "/* mustrun */ "
+ if md.IsPreserveSig then output_string os "preservesig "
+ if md.IsNoInline then output_string os "noinlining "
+ if md.IsAggressiveInline then output_string os "aggressiveinlining "
(goutput_mbody is_entrypoint menv) os md;
output_string os "\n"
diff --git a/src/absil/ilread.fs b/src/absil/ilread.fs
index 4f4533af81..41e534aedb 100755
--- a/src/absil/ilread.fs
+++ b/src/absil/ilread.fs
@@ -2301,6 +2301,7 @@ and seekReadMethod ctxt numtypars (idx:int) =
let internalcall = (implflags &&& 0x1000) <> 0x0
let synchronized = (implflags &&& 0x0020) <> 0x0
let noinline = (implflags &&& 0x0008) <> 0x0
+ let aggressiveinline = (implflags &&& 0x0100) <> 0x0
let mustrun = (implflags &&& 0x0040) <> 0x0
let cctor = (nm = ".cctor")
let ctor = (nm = ".ctor")
@@ -2338,6 +2339,7 @@ and seekReadMethod ctxt numtypars (idx:int) =
IsUnmanagedExport=export
IsSynchronized=synchronized
IsNoInline=noinline
+ IsAggressiveInline=aggressiveinline
IsMustRun=mustrun
IsPreserveSig=preservesig
IsManaged = not unmanaged
@@ -2358,7 +2360,7 @@ and seekReadMethod ctxt numtypars (idx:int) =
//if codeRVA <> 0x0 then dprintn "non-IL or abstract method with non-zero RVA"
mkMethBodyLazyAux (notlazy MethodBody.Abstract)
else
- seekReadMethodRVA ctxt (idx,nm,internalcall,noinline,numtypars) codeRVA
+ seekReadMethodRVA ctxt (idx,nm,internalcall,noinline,aggressiveinline,numtypars) codeRVA
}
@@ -2877,9 +2879,9 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints =
instrs,rawToLabel, lab2pc, raw2nextLab
#if FX_NO_PDB_READER
-and seekReadMethodRVA ctxt (_idx,nm,_internalcall,noinline,numtypars) rva =
+and seekReadMethodRVA ctxt (_idx,nm,_internalcall,noinline,aggressiveinline,numtypars) rva =
#else
-and seekReadMethodRVA ctxt (idx,nm,_internalcall,noinline,numtypars) rva =
+and seekReadMethodRVA ctxt (idx,nm,_internalcall,noinline,aggressiveinline,numtypars) rva =
#endif
mkMethBodyLazyAux
(lazy
@@ -2965,6 +2967,7 @@ and seekReadMethodRVA ctxt (idx,nm,_internalcall,noinline,numtypars) rva =
{ IsZeroInit=false
MaxStack= 8
NoInlining=noinline
+ AggressiveInlining=aggressiveinline
Locals=List.empty
SourceMarker=methRangePdbInfo
Code=code }
@@ -3090,6 +3093,7 @@ and seekReadMethodRVA ctxt (idx,nm,_internalcall,noinline,numtypars) rva =
{ IsZeroInit=initlocals
MaxStack= maxstack
NoInlining=noinline
+ AggressiveInlining=aggressiveinline
Locals = locals
Code=code
SourceMarker=methRangePdbInfo}
@@ -3967,7 +3971,7 @@ let OpenILModuleReader infile opts =
// ++GLOBAL MUTABLE STATE (concurrency safe via locking)
type ILModuleReaderCacheLockToken() = interface LockToken
-let ilModuleReaderCache = new AgedLookup(0, areSame=(fun (x,y) -> x = y))
+let ilModuleReaderCache = new AgedLookup(0, areSimilar=(fun (x,y) -> x = y))
let ilModuleReaderCacheLock = Lock()
let OpenILModuleReaderAfterReadingAllBytes infile opts =
@@ -3976,15 +3980,17 @@ let OpenILModuleReaderAfterReadingAllBytes infile opts =
try
(FileSystem.GetFullPathShim(infile),
FileSystem.GetLastWriteTimeShim(infile),
- opts.ilGlobals.primaryAssemblyName,
+ opts.ilGlobals.primaryAssemblyScopeRef,
opts.pdbPath.IsSome), true
with e ->
- System.Diagnostics.Debug.Assert(false, "Failed to compute key in OpenILModuleReaderAfterReadingAllBytes cache. Falling back to uncached.")
- ("",System.DateTime.Now,"",false), false
+ System.Diagnostics.Debug.Assert(false, sprintf "Failed to compute key in OpenILModuleReaderAfterReadingAllBytes cache for '%s'. Falling back to uncached." infile)
+ ("",System.DateTime.Now,ILScopeRef.Local,false), false
+
let cacheResult =
if not succeeded then None // Fall back to uncached.
else if opts.pdbPath.IsSome then None // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable
else ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.TryGet(ltok, key))
+
match cacheResult with
| Some(ilModuleReader) -> ilModuleReader
| None ->
diff --git a/src/absil/ilreflect.fs b/src/absil/ilreflect.fs
index 9af6d441de..8a67b5e084 100755
--- a/src/absil/ilreflect.fs
+++ b/src/absil/ilreflect.fs
@@ -301,7 +301,7 @@ module Zmap =
let force x m str = match Zmap.tryFind x m with Some y -> y | None -> failwithf "Zmap.force: %s: x = %+A" str x
let equalTypes (s:Type) (t:Type) = s.Equals(t)
-let equalTypeLists ss tt = List.lengthsEqAndForall2 equalTypes ss tt
+let equalTypeLists ss tt = List.lengthsEqAndForall2 equalTypes ss tt
let getGenericArgumentsOfType (typT : Type) =
if typT.IsGenericType then typT.GetGenericArguments() else [| |]
@@ -1466,6 +1466,7 @@ let convMethodImplFlags mdef =
||| flagsIf mdef.IsPreserveSig MethodImplAttributes.PreserveSig
||| flagsIf mdef.IsSynchronized MethodImplAttributes.Synchronized
||| flagsIf (match mdef.mdBody.Contents with MethodBody.IL b -> b.NoInlining | _ -> false) MethodImplAttributes.NoInlining
+ ||| flagsIf (match mdef.mdBody.Contents with MethodBody.IL b -> b.AggressiveInlining | _ -> false) MethodImplAttributes.AggressiveInlining
//----------------------------------------------------------------------------
// buildMethodPass2
diff --git a/src/absil/ilwrite.fs b/src/absil/ilwrite.fs
index 0349ae5ca7..c75b4a7735 100755
--- a/src/absil/ilwrite.fs
+++ b/src/absil/ilwrite.fs
@@ -105,7 +105,8 @@ let getUncodedToken (tab:TableName) idx = ((tab.Index <<< 24) ||| idx)
// 0x01-0x08, 0x0E-0x1F, 0x27, 0x2D,
// 0x7F. Otherwise, it holds 0. The 1 signifies Unicode characters that require handling beyond that normally provided for 8-bit encoding sets.
-// HOWEVER, there is a discrepancy here between the ECMA spec and the Microsoft C# implementation. The code below follows the latter. We�ve raised the issue with both teams. See Dev10 bug 850073 for details.
+// HOWEVER, there is a discrepancy here between the ECMA spec and the Microsoft C# implementation.
+// The code below follows the latter. We've raised the issue with both teams. See Dev10 bug 850073 for details.
let markerForUnicodeBytes (b:byte[]) =
let len = b.Length
@@ -550,6 +551,7 @@ type MetadataTable =
type cenv =
{ ilg: ILGlobals
emitTailcalls: bool
+ deterministic: bool
showTimes: bool
desiredMetadataVersion: ILVersionInfo
requiredDataFixups: (int32 * (int * bool)) list ref
@@ -2537,6 +2539,7 @@ let GenMethodDefAsRow cenv env midx (md: ILMethodDef) =
| _ -> false) then 0x1000 else 0x0) ||| // RTSpecialName
(if md.IsReqSecObj then 0x8000 else 0x0) |||
(if md.HasSecurity || not md.SecurityDecls.AsList.IsEmpty then 0x4000 else 0x0)
+
let implflags =
(match md.mdCodeKind with
| MethodCodeKind.Native -> 0x0001
@@ -2548,7 +2551,8 @@ let GenMethodDefAsRow cenv env midx (md: ILMethodDef) =
(if md.IsPreserveSig then 0x0080 else 0x0000) |||
(if md.IsSynchronized then 0x0020 else 0x0000) |||
(if md.IsMustRun then 0x0040 else 0x0000) |||
- (if (md.IsNoInline || (match md.mdBody.Contents with MethodBody.IL il -> il.NoInlining | _ -> false)) then 0x0008 else 0x0000)
+ (if (md.IsNoInline || (match md.mdBody.Contents with MethodBody.IL il -> il.NoInlining | _ -> false)) then 0x0008 else 0x0000) |||
+ (if (md.IsAggressiveInline || (match md.mdBody.Contents with MethodBody.IL il -> il.AggressiveInlining | _ -> false)) then 0x0100 else 0x0000)
if md.IsEntryPoint then
if cenv.entrypoint <> None then failwith "duplicate entrypoint"
@@ -2780,8 +2784,8 @@ let rec GenTypeDefPass3 enc cenv (td:ILTypeDef) =
if Option.isSome layout.Pack || Option.isSome layout.Size then
AddUnsharedRow cenv TableNames.ClassLayout
(UnsharedRow
- [| UShort (match layout.Pack with None -> uint16 0x0 | Some p -> p)
- ULong (match layout.Size with None -> 0x0 | Some p -> p)
+ [| UShort (defaultArg layout.Pack (uint16 0x0))
+ ULong (defaultArg layout.Size 0x0)
SimpleIndex (TableNames.TypeDef, tidx) |]) |> ignore
td.SecurityDecls.AsList |> GenSecurityDeclsPass3 cenv (hds_TypeDef,tidx)
@@ -2902,9 +2906,15 @@ and newGuid (modul: ILModuleDef) =
let m2 = hash modul.Name
[| b0 m; b1 m; b2 m; b3 m; b0 m2; b1 m2; b2 m2; b3 m2; 0xa7uy; 0x45uy; 0x03uy; 0x83uy; b0 n; b1 n; b2 n; b3 n |]
-and GetModuleAsRow cenv (modul: ILModuleDef) =
+and deterministicGuid (modul: ILModuleDef) =
+ let n = 16909060
+ let m = hash n
+ let m2 = hash modul.Name
+ [| b0 m; b1 m; b2 m; b3 m; b0 m2; b1 m2; b2 m2; b3 m2; 0xa7uy; 0x45uy; 0x03uy; 0x83uy; b0 n; b1 n; b2 n; b3 n |]
+
+and GetModuleAsRow (cenv:cenv) (modul: ILModuleDef) =
// Store the generated MVID in the environment (needed for generating debug information)
- let modulGuid = newGuid modul
+ let modulGuid = if cenv.deterministic then deterministicGuid modul else newGuid modul
cenv.moduleGuid <- modulGuid
UnsharedRow
[| UShort (uint16 0x0)
@@ -2953,11 +2963,12 @@ let GenModule (cenv : cenv) (modul: ILModuleDef) =
GenTypeDefsPass4 [] cenv tds
reportTime cenv.showTimes "Module Generation Pass 4"
-let generateIL requiredDataFixups (desiredMetadataVersion,generatePdb, ilg : ILGlobals, emitTailcalls,showTimes) (m : ILModuleDef) cilStartAddress =
+let generateIL requiredDataFixups (desiredMetadataVersion,generatePdb, ilg : ILGlobals, emitTailcalls, deterministic, showTimes) (m : ILModuleDef) cilStartAddress =
let isDll = m.IsDLL
let cenv =
{ emitTailcalls=emitTailcalls
+ deterministic = deterministic
showTimes=showTimes
ilg = ilg
desiredMetadataVersion=desiredMetadataVersion
@@ -3097,7 +3108,7 @@ module FileSystemUtilites =
#endif
()
-let writeILMetadataAndCode (generatePdb,desiredMetadataVersion,ilg,emitTailcalls,showTimes) modul cilStartAddress =
+let writeILMetadataAndCode (generatePdb,desiredMetadataVersion,ilg,emitTailcalls,deterministic,showTimes) modul cilStartAddress =
// When we know the real RVAs of the data section we fixup the references for the FieldRVA table.
// These references are stored as offsets into the metadata we return from this function
@@ -3106,7 +3117,7 @@ let writeILMetadataAndCode (generatePdb,desiredMetadataVersion,ilg,emitTailcalls
let next = cilStartAddress
let strings,userStrings,blobs,guids,tables,entryPointToken,code,requiredStringFixups,data,resources,pdbData,mappings =
- generateIL requiredDataFixups (desiredMetadataVersion,generatePdb,ilg,emitTailcalls,showTimes) modul cilStartAddress
+ generateIL requiredDataFixups (desiredMetadataVersion,generatePdb,ilg,emitTailcalls,deterministic,showTimes) modul cilStartAddress
reportTime showTimes "Generated Tables and Code"
let tableSize (tab: TableName) = tables.[tab.Index].Count
@@ -3403,7 +3414,7 @@ let writeILMetadataAndCode (generatePdb,desiredMetadataVersion,ilg,emitTailcalls
reportTime showTimes "Layout Metadata"
- let metadata =
+ let metadata, guidStart =
let mdbuf = ByteBuffer.Create 500000
mdbuf.EmitIntsAsBytes
[| 0x42; 0x53; 0x4a; 0x42; // Magic signature
@@ -3461,6 +3472,7 @@ let writeILMetadataAndCode (generatePdb,desiredMetadataVersion,ilg,emitTailcalls
reportTime showTimes "Write Metadata User Strings";
// The GUID stream
+ let guidStart = mdbuf.Position
Array.iter mdbuf.EmitBytes guids;
// The blob stream
@@ -3472,7 +3484,7 @@ let writeILMetadataAndCode (generatePdb,desiredMetadataVersion,ilg,emitTailcalls
mdbuf.EmitIntAsByte 0x00;
reportTime showTimes "Write Blob Stream";
// Done - close the buffer and return the result.
- mdbuf.Close()
+ mdbuf.Close(), guidStart
// Now we know the user string tables etc. we can fixup the
@@ -3487,7 +3499,7 @@ let writeILMetadataAndCode (generatePdb,desiredMetadataVersion,ilg,emitTailcalls
applyFixup32 code locInCode token
reportTime showTimes "Fixup Metadata";
- entryPointToken,code, codePadding,metadata,data,resources,!requiredDataFixups,pdbData,mappings
+ entryPointToken,code, codePadding,metadata,data,resources,!requiredDataFixups,pdbData,mappings,guidStart
//---------------------------------------------------------------------
// PHYSICAL METADATA+BLOBS --> PHYSICAL PE FORMAT
@@ -3549,7 +3561,7 @@ let writeBytes (os: BinaryWriter) (chunk:byte[]) = os.Write(chunk,0,chunk.Length
let writeBinaryAndReportMappings (outfile,
ilg: ILGlobals, pdbfile: string option, signer: ILStrongNameSigner option, portablePDB, embeddedPDB,
- embedAllSource, embedSourceList, sourceLink, emitTailcalls, showTimes, dumpDebugInfo) modul =
+ embedAllSource, embedSourceList, sourceLink, emitTailcalls, deterministic, showTimes, dumpDebugInfo ) modul =
// Store the public key from the signer into the manifest. This means it will be written
// to the binary and also acts as an indicator to leave space for delay sign
@@ -3665,8 +3677,8 @@ let writeBinaryAndReportMappings (outfile,
| Some v -> v
| None -> failwith "Expected msorlib to have a version number"
- let entryPointToken,code,codePadding,metadata,data,resources,requiredDataFixups,pdbData,mappings =
- writeILMetadataAndCode ((pdbfile <> None), desiredMetadataVersion, ilg,emitTailcalls,showTimes) modul next
+ let entryPointToken,code,codePadding,metadata,data,resources,requiredDataFixups,pdbData,mappings,guidStart =
+ writeILMetadataAndCode ((pdbfile <> None), desiredMetadataVersion, ilg,emitTailcalls, deterministic, showTimes) modul next
reportTime showTimes "Generated IL and metadata";
let _codeChunk,next = chunk code.Length next
@@ -3702,7 +3714,7 @@ let writeBinaryAndReportMappings (outfile,
let pdbOpt =
match portablePDB with
| true ->
- let (uncompressedLength, contentId, stream) as pdbStream = generatePortablePdb embedAllSource embedSourceList sourceLink showTimes pdbData
+ let (uncompressedLength, contentId, stream) as pdbStream = generatePortablePdb embedAllSource embedSourceList sourceLink showTimes pdbData deterministic
if embeddedPDB then Some (compressPortablePdbStream uncompressedLength contentId stream)
else Some (pdbStream)
| _ -> None
@@ -3848,7 +3860,33 @@ let writeBinaryAndReportMappings (outfile,
writeInt32AsUInt16 os 0x014c; // Machine - IMAGE_FILE_MACHINE_I386
writeInt32AsUInt16 os numSections;
- writeInt32 os timestamp // date since 1970
+
+ let pdbData =
+ if deterministic then
+ // Hash code, data and metadata
+ use sha = System.Security.Cryptography.SHA1.Create() // IncrementalHash is core only
+ let hCode = sha.ComputeHash code
+ let hData = sha.ComputeHash data
+ let hMeta = sha.ComputeHash metadata
+ let final = [| hCode; hData; hMeta |] |> Array.collect id |> sha.ComputeHash
+
+ // Confirm we have found the correct data and aren't corrupting the metadata
+ if metadata.[ guidStart..guidStart+3] <> [| 4uy; 3uy; 2uy; 1uy |] then failwith "Failed to find MVID"
+ if metadata.[ guidStart+12..guidStart+15] <> [| 4uy; 3uy; 2uy; 1uy |] then failwith "Failed to find MVID"
+
+ // Update MVID guid in metadata
+ Array.blit final 0 metadata guidStart 16
+
+ // Use last 4 bytes for timestamp - High bit set, to stop tool chains becoming confused
+ let timestamp = int final.[16] ||| (int final.[17] <<< 8) ||| (int final.[18] <<< 16) ||| (int (final.[19] ||| 128uy) <<< 24)
+ writeInt32 os timestamp
+ // Update pdbData with new guid and timestamp. Portable and embedded PDBs don't need the ModuleID
+ // Full and PdbOnly aren't supported under deterministic builds currently, they rely on non-determinsitic Windows native code
+ { pdbData with ModuleID = final.[0..15] ; Timestamp = timestamp }
+ else
+ writeInt32 os timestamp // date since 1970
+ pdbData
+
writeInt32 os 0x00; // Pointer to Symbol Table Always 0
// 00000090
writeInt32 os 0x00; // Number of Symbols Always 0
@@ -4276,12 +4314,13 @@ type options =
sourceLink: string
signer: ILStrongNameSigner option
emitTailcalls : bool
+ deterministic : bool
showTimes: bool
dumpDebugInfo:bool }
let WriteILBinary (outfile, (args: options), modul) =
writeBinaryAndReportMappings (outfile,
args.ilg, args.pdbfile, args.signer, args.portablePDB, args.embeddedPDB, args.embedAllSource,
- args.embedSourceList, args.sourceLink, args.emitTailcalls, args.showTimes, args.dumpDebugInfo) modul
+ args.embedSourceList, args.sourceLink, args.emitTailcalls, args.deterministic, args.showTimes, args.dumpDebugInfo) modul
|> ignore
diff --git a/src/absil/ilwrite.fsi b/src/absil/ilwrite.fsi
index 6ab71287d3..89c6fd0354 100755
--- a/src/absil/ilwrite.fsi
+++ b/src/absil/ilwrite.fsi
@@ -25,6 +25,7 @@ type options =
sourceLink: string
signer : ILStrongNameSigner option
emitTailcalls: bool
+ deterministic: bool
showTimes : bool
dumpDebugInfo : bool }
diff --git a/src/absil/ilwritepdb.fs b/src/absil/ilwritepdb.fs
index 4ee0a0f0d8..0c7d112235 100644
--- a/src/absil/ilwritepdb.fs
+++ b/src/absil/ilwritepdb.fs
@@ -219,7 +219,7 @@ let getRowCounts tableRowCounts =
tableRowCounts |> Seq.iter(fun x -> builder.Add(x))
builder.MoveToImmutable()
-let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sourceLink:string) showTimes (info:PdbData) =
+let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sourceLink:string) showTimes (info:PdbData) isDeterministic =
sortMethods showTimes info
let externalRowCounts = getRowCounts info.TableRowCounts
let docs =
@@ -260,12 +260,9 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou
let documentIndex =
let includeSource file =
- let isInList =
- if isNil embedSourceList then false
- else
- embedSourceList |> List.tryFind(fun f -> String.Compare(file, f, StringComparison.OrdinalIgnoreCase ) = 0) |> Option.isSome
+ let isInList = embedSourceList |> List.exists (fun f -> String.Compare(file, f, StringComparison.OrdinalIgnoreCase ) = 0)
- if not embedAllSource && not isInList || not (File.Exists(file)) then
+ if not embedAllSource && not isInList || not (File.Exists file) then
None
else
let stream = File.OpenRead(file)
@@ -448,7 +445,19 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou
| None -> MetadataTokens.MethodDefinitionHandle(0)
| Some x -> MetadataTokens.MethodDefinitionHandle(x)
- let serializer = PortablePdbBuilder(metadata, externalRowCounts, entryPoint, null)
+ let deterministicIdProvider isDeterministic : System.Func, BlobContentId> =
+ match isDeterministic with
+ | false -> null
+ | true ->
+ let convert (content:IEnumerable) =
+ use sha = System.Security.Cryptography.SHA1.Create() // IncrementalHash is core only
+ let hash = content
+ |> Seq.map ( fun c -> c.GetBytes().Array |> sha.ComputeHash )
+ |> Seq.collect id |> Array.ofSeq |> sha.ComputeHash
+ BlobContentId.FromHash(hash)
+ System.Func, BlobContentId>( convert )
+
+ let serializer = PortablePdbBuilder(metadata, externalRowCounts, entryPoint, deterministicIdProvider isDeterministic)
let blobBuilder = new BlobBuilder()
let contentId= serializer.Serialize(blobBuilder)
let portablePdbStream = new MemoryStream()
diff --git a/src/absil/ilwritepdb.fsi b/src/absil/ilwritepdb.fsi
index d6a3f8d83c..e2b310747b 100644
--- a/src/absil/ilwritepdb.fsi
+++ b/src/absil/ilwritepdb.fsi
@@ -82,7 +82,7 @@ type idd =
iddData: byte[];
iddChunk: BinaryChunk }
-val generatePortablePdb : embedAllSource:bool -> embedSourceList:string list -> sourceLink: string -> showTimes:bool -> info:PdbData -> (int64 * BlobContentId * MemoryStream)
+val generatePortablePdb : embedAllSource:bool -> embedSourceList:string list -> sourceLink: string -> showTimes:bool -> info:PdbData -> isDeterministic:bool -> (int64 * BlobContentId * MemoryStream)
val compressPortablePdbStream : uncompressedLength:int64 -> contentId:BlobContentId -> stream:MemoryStream -> (int64 * BlobContentId * MemoryStream)
val embedPortablePdbInfo : uncompressedLength:int64 -> contentId:BlobContentId -> stream:MemoryStream -> showTimes:bool -> fpdb:string -> cvChunk:BinaryChunk -> pdbChunk:BinaryChunk -> idd[]
val writePortablePdbInfo : contentId:BlobContentId -> stream:MemoryStream -> showTimes:bool -> fpdb:string -> cvChunk:BinaryChunk -> idd[]
diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs
new file mode 100644
index 0000000000..bbb567bd41
--- /dev/null
+++ b/src/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.FSharp
+open System.Reflection
+[]
+[]
+[]
+[]
+[]
+do()
+
+#if NO_STRONG_NAMES
+[]
+#endif
+#if STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
+[]
+#endif
+
+// Until dotnet sdk can version assemblies, use this
+#if BUILD_FROM_SOURCE
+[]
+[]
+[]
+#endif
+
+do()
diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs
new file mode 100644
index 0000000000..59cfa768ea
--- /dev/null
+++ b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.FSharp
+open System.Reflection
+open System.Runtime.InteropServices
+
+[]
+[]
+[]
+[]
+[]
+[]
+
+#if NO_STRONG_NAMES
+[]
+[]
+#endif
+
+#if STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
+[]
+[]
+#endif
+
+#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
+[]
+[]
+#endif
+
+// Until dotnet sdk can version assemblies, use this
+#if BUILD_FROM_SOURCE
+[]
+[]
+[]
+#endif
+
+do()
diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Private.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Private.dll.fs
new file mode 100644
index 0000000000..99584f0034
--- /dev/null
+++ b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Private.dll.fs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.FSharp
+open System.Reflection
+open System.Runtime.InteropServices
+
+[]
+[]
+[]
+[]
+[]
+[]
+
+#if NO_STRONG_NAMES
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+
+// Note: internals visible to unit test DLLs in Retail (and all) builds.
+[]
+[]
+[]
+[]
+[]
+#endif
+#if STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
+
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+#endif
+#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+#endif
+
+// Until dotnet sdk can version assemblies, use this
+#if BUILD_FROM_SOURCE
+[]
+[]
+[]
+#endif
+
+do()
diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Service.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Service.dll.fs
old mode 100755
new mode 100644
index 13141ee3b6..a3a2d38968
--- a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Service.dll.fs
+++ b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Service.dll.fs
@@ -4,31 +4,30 @@ namespace Microsoft.FSharp
open System.Reflection
open System.Runtime.InteropServices
-[]
-[]
-[]
-[]
-
-[]
-[]
-[]
-[]
-[]
-[]
-[]
+[]
+[]
+[]
+[]
+[]
[]
#if NO_STRONG_NAMES
[]
[]
[]
-[]
[]
[]
[]
[]
[]
[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
// Note: internals visible to unit test DLLs in Retail (and all) builds.
[]
@@ -38,10 +37,10 @@ open System.Runtime.InteropServices
[]
#endif
#if STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
+
[]
[]
[]
-[]
[]
[]
[]
@@ -59,7 +58,6 @@ open System.Runtime.InteropServices
[]
[]
[]
-[]
[]
[]
[]
@@ -72,4 +70,12 @@ open System.Runtime.InteropServices
[]
[]
#endif
+
+// Until dotnet sdk can version assemblies, use this
+#if BUILD_FROM_SOURCE
+[]
+[]
+[]
+#endif
+
do()
diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs
new file mode 100644
index 0000000000..4b51c78289
--- /dev/null
+++ b/src/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.FSharp
+open System.Reflection
+open System.Runtime.InteropServices
+
+[]
+[]
+[]
+[]
+[]
+#if !FSCORE_PORTABLE_OLD
+[]
+#endif
+
+#if PORTABLE
+[]
+[]
+#endif
+
+// Until dotnet sdk can version assemblies, use this
+#if BUILD_FROM_SOURCE
+[]
+[]
+[]
+#endif
+
+do()
+
diff --git a/src/assemblyinfo/assemblyinfo.fsc.exe.fs b/src/assemblyinfo/assemblyinfo.fsc.exe.fs
index 353c1635ca..f431d42923 100755
--- a/src/assemblyinfo/assemblyinfo.fsc.exe.fs
+++ b/src/assemblyinfo/assemblyinfo.fsc.exe.fs
@@ -12,4 +12,12 @@ open System.Runtime.InteropServices
[]
[]
+
+// Until dotnet sdk can version assemblies, use this
+#if BUILD_FROM_SOURCE
+[]
+[]
+[]
+#endif
+
do()
diff --git a/src/assemblyinfo/assemblyinfo.fsi.exe.fs b/src/assemblyinfo/assemblyinfo.fsi.exe.fs
index 3c906f8805..5023b66eac 100755
--- a/src/assemblyinfo/assemblyinfo.fsi.exe.fs
+++ b/src/assemblyinfo/assemblyinfo.fsi.exe.fs
@@ -7,4 +7,12 @@ open System.Reflection
[]
[]
[]
+
+// Until dotnet sdk can version assemblies, use this
+#if BUILD_FROM_SOURCE
+[]
+[]
+[]
+#endif
+
do()
diff --git a/src/buildfromsource.cmd b/src/buildfromsource.cmd
new file mode 100644
index 0000000000..9d50b36d78
--- /dev/null
+++ b/src/buildfromsource.cmd
@@ -0,0 +1,35 @@
+@if "%_echo%"=="" echo off
+
+set __scriptpath=%~dp0
+
+rem build tools
+dotnet restore %__scriptpath%buildtools\fssrgen\fssrgen.fsproj
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+dotnet publish %__scriptpath%buildtools\fssrgen\fssrgen.fsproj -o %__scriptpath%..\Tools\fssrgen
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+
+dotnet restore %__scriptpath%buildtools\fslex\fslex.fsproj
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+dotnet publish %__scriptpath%buildtools\fslex\fslex.fsproj -o %__scriptpath%..\Tools\fslex
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+dotnet restore %__scriptpath%buildtools\fsyacc\fsyacc.fsproj
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+dotnet publish %__scriptpath%buildtools\fsyacc\fsyacc.fsproj -o %__scriptpath%..\Tools\fsyacc
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+
+rem build and pack tools
+dotnet restore %__scriptpath%fsharp\FSharp.Compiler.nuget\FSharp.Compiler.nuget.BuildFromSource.fsproj
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+dotnet pack %__scriptpath%fsharp\FSharp.Compiler.nuget\FSharp.Compiler.nuget.BuildFromSource.fsproj -c release
+if ERRORLEVEL 1 echo Error: failed && goto :failure
+
+goto :success
+
+REM ------ exit -------------------------------------
+:failure
+endlocal
+exit /b 1
+
+:success
+endlocal
+exit /b 0
diff --git a/src/buildfromsource.sh b/src/buildfromsource.sh
new file mode 100755
index 0000000000..64f0a11f45
--- /dev/null
+++ b/src/buildfromsource.sh
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
+
+# build tools
+dotnet restore $__scriptpath/buildtools/fssrgen/fssrgen.fsproj
+dotnet publish $__scriptpath/buildtools/fssrgen/fssrgen.fsproj -o $__scriptpath/../Tools/fssrgen
+dotnet restore $__scriptpath/buildtools/fslex/fslex.fsproj
+dotnet publish $__scriptpath/buildtools/fslex/fslex.fsproj -o $__scriptpath/../Tools/fslex
+dotnet restore $__scriptpath/buildtools/fsyacc/fsyacc.fsproj
+dotnet publish $__scriptpath/buildtools/fsyacc/fsyacc.fsproj -o $__scriptpath/../Tools/fsyacc
+
+# build tools
+dotnet restore $__scriptpath/fsharp/FSharp.Build/FSharp.Build.BuildFromSource.fsproj
+dotnet publish $__scriptpath/fsharp/FSharp.Build/FSharp.Build.BuildFromSource.fsproj
+
+dotnet restore $__scriptpath/fsharp/fsi/Fsi.BuildFromSource.fsproj
+dotnet publish fsharp/fsi/Fsi.BuildFromSource.fsproj
+
+dotnet restore $__scriptpath/fsharp/Fsc/Fsc.BuildFromSource.fsproj
+dotnet publish $__scriptpath/fsharp/Fsc/Fsc.BuildFromSource.fsproj
+
+# build and pack tools
+dotnet restore $__scriptpath/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.nuget.BuildFromSource.fsproj
+dotnet pack $__scriptpath/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.nuget.BuildFromSource.fsproj -c release
diff --git a/src/buildtools/buildtools.targets b/src/buildtools/buildtools.targets
new file mode 100644
index 0000000000..f82f981542
--- /dev/null
+++ b/src/buildtools/buildtools.targets
@@ -0,0 +1,69 @@
+
+
+
+
+ CallFsLex;CallFsYacc;$(CompileDependsOn)
+ $(MSBuildThisFileDirectory)
+ fslex.exe
+ $(MSBuildThisFileDirectory)
+ fsyacc.exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
diff --git a/samples/FsiExe/App.config b/src/buildtools/fslex/App.config
similarity index 76%
rename from samples/FsiExe/App.config
rename to src/buildtools/fslex/App.config
index 150b1ea19a..e1b09eda9f 100644
--- a/samples/FsiExe/App.config
+++ b/src/buildtools/fslex/App.config
@@ -1,15 +1,14 @@
+
+
+
-
-
+
-
-
-
\ No newline at end of file
diff --git a/src/buildtools/fslex/Arg.fs b/src/buildtools/fslex/Arg.fs
new file mode 100644
index 0000000000..a1f63bd963
--- /dev/null
+++ b/src/buildtools/fslex/Arg.fs
@@ -0,0 +1,133 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities
+#else
+namespace Microsoft.FSharp.Text
+#endif
+
+
+type ArgType =
+ | ClearArg of bool ref
+ | FloatArg of (float -> unit)
+ | IntArg of (int -> unit)
+ | RestArg of (string -> unit)
+ | SetArg of bool ref
+ | StringArg of (string -> unit)
+ | UnitArg of (unit -> unit)
+ static member Clear r = ClearArg r
+ static member Float r = FloatArg r
+ static member Int r = IntArg r
+ static member Rest r = RestArg r
+ static member Set r = SetArg r
+ static member String r = StringArg r
+ static member Unit r = UnitArg r
+
+
+type ArgInfo (name,action,help) =
+ member x.Name = name
+ member x.ArgType = action
+ member x.HelpText = help
+
+exception Bad of string
+exception HelpText of string
+
+[]
+type ArgParser() =
+ static let getUsage specs u =
+ let sbuf = new System.Text.StringBuilder 100
+ let pstring (s:string) = sbuf.Append s |> ignore
+ let pendline s = pstring s; pstring "\n"
+ pendline u;
+ List.iter (fun (arg:ArgInfo) ->
+ match arg.Name, arg.ArgType, arg.HelpText with
+ | (s, (UnitArg _ | SetArg _ | ClearArg _), helpText) -> pstring "\t"; pstring s; pstring ": "; pendline helpText
+ | (s, StringArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, IntArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, FloatArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, RestArg _, helpText) -> pstring "\t"; pstring s; pstring " ...: "; pendline helpText)
+ specs;
+ pstring "\t"; pstring "--help"; pstring ": "; pendline "display this list of options";
+ pstring "\t"; pstring "-help"; pstring ": "; pendline "display this list of options";
+ sbuf.ToString()
+
+
+ static member ParsePartial(cursor,argv,argSpecs:seq,?other,?usageText) =
+ let other = defaultArg other (fun _ -> ())
+ let usageText = defaultArg usageText ""
+ let nargs = Array.length argv
+ incr cursor;
+ let argSpecs = argSpecs |> Seq.toList
+ let specs = argSpecs |> List.map (fun (arg:ArgInfo) -> arg.Name, arg.ArgType)
+ while !cursor < nargs do
+ let arg = argv.[!cursor]
+ let rec findMatchingArg args =
+ match args with
+ | ((s, action) :: _) when s = arg ->
+ let getSecondArg () =
+ if !cursor + 1 >= nargs then
+ raise(Bad("option "+s+" needs an argument.\n"+getUsage argSpecs usageText));
+ argv.[!cursor+1]
+
+ match action with
+ | UnitArg f ->
+ f ();
+ incr cursor
+ | SetArg f ->
+ f := true;
+ incr cursor
+ | ClearArg f ->
+ f := false;
+ incr cursor
+ | StringArg f->
+ let arg2 = getSecondArg()
+ f arg2;
+ cursor := !cursor + 2
+ | IntArg f ->
+ let arg2 = getSecondArg ()
+ let arg2 = try int32 arg2 with _ -> raise(Bad(getUsage argSpecs usageText)) in
+ f arg2;
+ cursor := !cursor + 2;
+ | FloatArg f ->
+ let arg2 = getSecondArg()
+ let arg2 = try float arg2 with _ -> raise(Bad(getUsage argSpecs usageText)) in
+ f arg2;
+ cursor := !cursor + 2;
+ | RestArg f ->
+ incr cursor;
+ while !cursor < nargs do
+ f (argv.[!cursor]);
+ incr cursor;
+
+ | (_ :: more) -> findMatchingArg more
+ | [] ->
+ if arg = "-help" || arg = "--help" || arg = "/help" || arg = "/help" || arg = "/?" then
+ raise (HelpText (getUsage argSpecs usageText))
+ // Note: for '/abc/def' does not count as an argument
+ // Note: '/abc' does
+ elif arg.Length>0 && (arg.[0] = '-' || (arg.[0] = '/' && not (arg.Length > 1 && arg.[1..].Contains ("/")))) then
+ raise (Bad ("unrecognized argument: "+ arg + "\n" + getUsage argSpecs usageText))
+ else
+ other arg;
+ incr cursor
+ findMatchingArg specs
+
+ static member Usage (specs,?usage) =
+ let usage = defaultArg usage ""
+ System.Console.Error.WriteLine (getUsage (Seq.toList specs) usage)
+
+ #if FX_NO_COMMAND_LINE_ARGS
+ #else
+ static member Parse (specs,?other,?usageText) =
+ let current = ref 0
+ let argv = System.Environment.GetCommandLineArgs()
+ try ArgParser.ParsePartial (current, argv, specs, ?other=other, ?usageText=usageText)
+ with
+ | Bad h
+ | HelpText h ->
+ System.Console.Error.WriteLine h;
+ System.Console.Error.Flush();
+ System.Environment.Exit(1);
+ | e ->
+ reraise()
+ #endif
diff --git a/src/buildtools/fslex/Arg.fsi b/src/buildtools/fslex/Arg.fsi
new file mode 100644
index 0000000000..367f69f959
--- /dev/null
+++ b/src/buildtools/fslex/Arg.fsi
@@ -0,0 +1,50 @@
+// (c) Microsoft Corporation 2005-2009.
+
+/// A simple command-line argument processor.
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities
+#else
+namespace Microsoft.FSharp.Text
+#endif
+
+/// The spec value describes the action of the argument,
+/// and whether it expects a following parameter.
+[]
+type ArgType =
+ static member Clear : bool ref -> ArgType
+ static member Float : (float -> unit) -> ArgType
+ static member Int : (int -> unit) -> ArgType
+ static member Rest : (string -> unit) -> ArgType
+ static member Set : bool ref -> ArgType
+ static member String : (string -> unit) -> ArgType
+ static member Unit : (unit -> unit) -> ArgType
+
+type ArgInfo =
+ new : name:string * action:ArgType * help:string -> ArgInfo
+ /// Return the name of the argument
+ member Name : string
+ /// Return the argument type and action of the argument
+ member ArgType : ArgType
+ /// Return the usage help associated with the argument
+ member HelpText : string
+
+[]
+type ArgParser =
+ #if FX_NO_COMMAND_LINE_ARGS
+ #else
+
+ /// Parse some of the arguments given by 'argv', starting at the given position
+ []
+ static member ParsePartial: cursor: int ref * argv: string[] * arguments:seq * ?otherArgs: (string -> unit) * ?usageText:string -> unit
+
+ /// Parse the arguments given by System.Environment.GetEnvironmentVariables()
+ /// according to the argument processing specifications "specs".
+ /// Args begin with "-". Non-arguments are passed to "f" in
+ /// order. "use" is printed as part of the usage line if an error occurs.
+
+ static member Parse: arguments:seq * ?otherArgs: (string -> unit) * ?usageText:string -> unit
+ #endif
+
+ /// Prints the help for each argument.
+ static member Usage : arguments:seq * ?usage:string -> unit
+
diff --git a/src/buildtools/fslex/Lexing.fs b/src/buildtools/fslex/Lexing.fs
new file mode 100644
index 0000000000..8337717d6f
--- /dev/null
+++ b/src/buildtools/fslex/Lexing.fs
@@ -0,0 +1,423 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#nowarn "47" // recursive initialization of LexBuffer
+
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Lexing
+
+#else
+namespace Microsoft.FSharp.Text.Lexing
+#endif
+
+ open System.Collections.Generic
+
+ // REVIEW: This type showed up on a parsing-intensive performance measurement. Consider whether it can be a struct-record later when we have this feature. -jomo
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal Position =
+#else
+ type Position =
+#endif
+ { pos_fname : string;
+ pos_lnum : int;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum : int;
+#endif
+ pos_bol : int;
+ pos_cnum : int; }
+ member x.FileName = x.pos_fname
+ member x.Line = x.pos_lnum
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ member x.OriginalLine = x.pos_orig_lnum
+#endif
+ member x.Char = x.pos_cnum
+ member x.AbsoluteOffset = x.pos_cnum
+ member x.StartOfLine = x.pos_bol
+ member x.StartOfLineAbsoluteOffset = x.pos_bol
+ member x.Column = x.pos_cnum - x.pos_bol
+ member pos.NextLine =
+ { pos with
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = pos.OriginalLine + 1;
+#endif
+ pos_lnum = pos.Line+1;
+ pos_bol = pos.AbsoluteOffset }
+ member pos.EndOfToken(n) = {pos with pos_cnum=pos.pos_cnum + n }
+ member pos.AsNewLinePos() = pos.NextLine
+ member pos.ShiftColumnBy(by) = {pos with pos_cnum = pos.pos_cnum + by}
+ static member Empty =
+ { pos_fname="";
+ pos_lnum= 0;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = 0;
+#endif
+ pos_bol= 0;
+ pos_cnum=0 }
+ static member FirstLine(filename) =
+ { pos_fname=filename;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = 1;
+#endif
+ pos_lnum= 1;
+ pos_bol= 0;
+ pos_cnum=0 }
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal LexBufferFiller<'char> =
+#else
+ type LexBufferFiller<'char> =
+#endif
+ { fillSync : (LexBuffer<'char> -> unit) option
+ fillAsync : (LexBuffer<'char> -> Async) option }
+
+ and []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ internal LexBuffer<'char>(filler: LexBufferFiller<'char>) as this =
+#else
+ LexBuffer<'char>(filler: LexBufferFiller<'char>) as this =
+#endif
+ let context = new Dictionary(1) in
+ let extendBufferSync = (fun () -> match filler.fillSync with Some refill -> refill this | None -> invalidOp "attempt to read synchronously from an asynchronous lex buffer")
+ let extendBufferAsync = (fun () -> match filler.fillAsync with Some refill -> refill this | None -> invalidOp "attempt to read asynchronously from a synchronous lex buffer")
+ let mutable buffer=[||];
+ /// number of valid charactes beyond bufferScanStart
+ let mutable bufferMaxScanLength=0;
+ /// count into the buffer when scanning
+ let mutable bufferScanStart=0;
+ /// number of characters scanned so far
+ let mutable bufferScanLength=0;
+ /// length of the scan at the last accepting state
+ let mutable lexemeLength=0;
+ /// action related to the last accepting state
+ let mutable bufferAcceptAction=0;
+ let mutable eof = false;
+ let mutable startPos = Position.Empty ;
+ let mutable endPos = Position.Empty
+
+ // Throw away all the input besides the lexeme
+
+ let discardInput () =
+ let keep = Array.sub buffer bufferScanStart bufferScanLength
+ let nkeep = keep.Length
+ Array.blit keep 0 buffer 0 nkeep;
+ bufferScanStart <- 0;
+ bufferMaxScanLength <- nkeep
+
+
+ member lexbuf.EndOfScan () : int =
+ // Printf.eprintf "endOfScan, lexBuffer.lexemeLength = %d\n" lexBuffer.lexemeLength;
+ if bufferAcceptAction < 0 then
+ failwith "unrecognized input"
+
+ // Printf.printf "endOfScan %d state %d on unconsumed input '%c' (%d)\n" a s (Char.chr inp) inp;
+ // Printf.eprintf "accept, lexeme = %s\n" (lexeme lexBuffer);
+ lexbuf.StartPos <- endPos;
+ lexbuf.EndPos <- endPos.EndOfToken(lexbuf.LexemeLength);
+ bufferAcceptAction
+
+ member lexbuf.StartPos
+ with get() = startPos
+ and set(b) = startPos <- b
+
+ member lexbuf.EndPos
+ with get() = endPos
+ and set(b) = endPos <- b
+
+ member lexbuf.Lexeme = Array.sub buffer bufferScanStart lexemeLength
+ member lexbuf.LexemeChar(n) = buffer.[n+bufferScanStart]
+
+ member lexbuf.BufferLocalStore = (context :> IDictionary<_,_>)
+ member lexbuf.LexemeLength with get() : int = lexemeLength and set v = lexemeLength <- v
+ member internal lexbuf.Buffer with get() : 'char[] = buffer and set v = buffer <- v
+ member internal lexbuf.BufferMaxScanLength with get() = bufferMaxScanLength and set v = bufferMaxScanLength <- v
+ member internal lexbuf.BufferScanLength with get() = bufferScanLength and set v = bufferScanLength <- v
+ member internal lexbuf.BufferScanStart with get() : int = bufferScanStart and set v = bufferScanStart <- v
+ member internal lexbuf.BufferAcceptAction with get() = bufferAcceptAction and set v = bufferAcceptAction <- v
+ member internal lexbuf.RefillBuffer = extendBufferSync
+ member internal lexbuf.AsyncRefillBuffer = extendBufferAsync
+
+ static member LexemeString(lexbuf:LexBuffer) =
+ new System.String(lexbuf.Buffer,lexbuf.BufferScanStart,lexbuf.LexemeLength)
+
+ member lexbuf.IsPastEndOfStream
+ with get() = eof
+ and set(b) = eof <- b
+
+ member lexbuf.DiscardInput() = discardInput ()
+
+ member x.BufferScanPos = bufferScanStart + bufferScanLength
+
+ member lexbuf.EnsureBufferSize n =
+ if lexbuf.BufferScanPos + n >= buffer.Length then
+ let repl = Array.zeroCreate (lexbuf.BufferScanPos + n)
+ Array.blit buffer bufferScanStart repl bufferScanStart bufferScanLength;
+ buffer <- repl
+
+ static member FromReadFunctions (syncRead : ('char[] * int * int -> int) option, asyncRead : ('char[] * int * int -> Async) option) : LexBuffer<'char> =
+ let extension= Array.zeroCreate 4096
+ let fillers =
+ { fillSync =
+ match syncRead with
+ | None -> None
+ | Some read ->
+ Some (fun lexBuffer ->
+ let n = read(extension,0,extension.Length)
+ lexBuffer.EnsureBufferSize n;
+ Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n);
+ fillAsync =
+ match asyncRead with
+ | None -> None
+ | Some read ->
+ Some (fun lexBuffer ->
+ async {
+ let! n = read(extension,0,extension.Length)
+ lexBuffer.EnsureBufferSize n;
+ Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n }) }
+ new LexBuffer<_>(fillers)
+
+ // A full type signature is required on this method because it is used at more specific types within its own scope
+ static member FromFunction (f : 'char[] * int * int -> int) : LexBuffer<'char> = LexBuffer<_>.FromReadFunctions(Some(f),None)
+ static member FromAsyncFunction (f : 'char[] * int * int -> Async) : LexBuffer<'char> = LexBuffer<_>.FromReadFunctions(None,Some(f))
+
+ static member FromCharFunction f : LexBuffer =
+ LexBuffer.FromFunction(fun (buff,start,len) ->
+ let buff2 = Array.zeroCreate len
+ let n = f buff2 len
+ Array.blit buff2 0 buff start len
+ n)
+ static member FromByteFunction f : LexBuffer =
+ LexBuffer.FromFunction(fun (buff,start,len) ->
+ let buff2 = Array.zeroCreate len
+ let n = f buff2 len
+ Array.blit buff2 0 buff start len
+ n)
+
+ // A full type signature is required on this method because it is used at more specific types within its own scope
+ static member FromArray (s: 'char[]) : LexBuffer<'char> =
+ let lexBuffer =
+ new LexBuffer<_>
+ { fillSync = Some (fun _ -> ());
+ fillAsync = Some (fun _ -> async { return () }) }
+ let buffer = Array.copy s
+ lexBuffer.Buffer <- buffer;
+ lexBuffer.BufferMaxScanLength <- buffer.Length;
+ lexBuffer
+
+ static member FromBytes (arr) = LexBuffer.FromArray(arr)
+ static member FromChars (arr) = LexBuffer.FromArray(arr)
+ static member FromString (s:string) = LexBuffer.FromChars (s.ToCharArray())
+
+ static member FromTextReader (tr:System.IO.TextReader) : LexBuffer =
+ LexBuffer.FromFunction(tr.Read)
+
+ static member FromBinaryReader (br:System.IO.BinaryReader) : LexBuffer =
+ LexBuffer.FromFunction(br.Read)
+
+ static member FromStream (stream:System.IO.Stream) : LexBuffer =
+ LexBuffer.FromReadFunctions(Some(stream.Read),Some(fun (buf,offset,len) -> stream.AsyncRead(buf,offset=offset,count=len)))
+
+ module GenericImplFragments =
+ let startInterpret(lexBuffer:LexBuffer<_>)=
+ lexBuffer.BufferScanStart <- lexBuffer.BufferScanStart + lexBuffer.LexemeLength;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferMaxScanLength - lexBuffer.LexemeLength;
+ lexBuffer.BufferScanLength <- 0;
+ lexBuffer.LexemeLength <- 0;
+ lexBuffer.BufferAcceptAction <- -1;
+
+ let afterRefill (trans: uint16[] array,sentinel,lexBuffer:LexBuffer<_>,scanUntilSentinel,endOfScan,state,eofPos) =
+ // end of file occurs if we couldn't extend the buffer
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ let snew = int trans.[state].[eofPos] // == EOF
+ if snew = sentinel then
+ endOfScan()
+ else
+ if lexBuffer.IsPastEndOfStream then failwith "End of file on lexing stream";
+ lexBuffer.IsPastEndOfStream <- true;
+ // Printf.printf "state %d --> %d on eof\n" state snew;
+ scanUntilSentinel(lexBuffer,snew)
+ else
+ scanUntilSentinel(lexBuffer, state)
+
+ let onAccept (lexBuffer:LexBuffer<_>,a) =
+ lexBuffer.LexemeLength <- lexBuffer.BufferScanLength;
+ lexBuffer.BufferAcceptAction <- a;
+
+ open GenericImplFragments
+
+ []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal AsciiTables(trans: uint16[] array, accept: uint16[]) =
+#else
+ type AsciiTables(trans: uint16[] array, accept: uint16[]) =
+#endif
+ let rec scanUntilSentinel(lexBuffer, state) =
+ let sentinel = 255 * 256 + 255
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept (lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,256 (* == EOF *) )
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
+ let snew = int trans.[state].[inp]
+ if snew = sentinel then
+ lexBuffer.EndOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ // Printf.printf "state %d --> %d on '%c' (%d)\n" state snew (Char.chr inp) inp;
+ scanUntilSentinel(lexBuffer, snew)
+
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member tables.Interpret(initialState,lexBuffer : LexBuffer) =
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) =
+
+ let rec scanUntilSentinel(lexBuffer,state) : Async =
+ async {
+ let sentinel = 255 * 256 + 255
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept (lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ do! lexBuffer.AsyncRefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,256 (* == EOF *) )
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
+ let snew = int trans.[state].[inp]
+ if snew = sentinel then
+ return! endOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ return! scanUntilSentinel(lexBuffer,snew)
+ }
+ and endOfScan() =
+ async { return lexBuffer.EndOfScan() }
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+
+ static member Create(trans,accept) = new AsciiTables(trans,accept)
+
+ []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal UnicodeTables(trans: uint16[] array, accept: uint16[]) =
+#else
+ type UnicodeTables(trans: uint16[] array, accept: uint16[]) =
+#endif
+ let sentinel = 255 * 256 + 255
+ let numUnicodeCategories = 30
+ let numLowUnicodeChars = 128
+ let numSpecificUnicodeChars = (trans.[0].Length - 1 - numLowUnicodeChars - numUnicodeCategories)/2
+ let lookupUnicodeCharacters (state,inp) =
+ let inpAsInt = int inp
+ // Is it a fast ASCII character?
+ if inpAsInt < numLowUnicodeChars then
+ int trans.[state].[inpAsInt]
+ else
+ // Search for a specific unicode character
+ let baseForSpecificUnicodeChars = numLowUnicodeChars
+ let rec loop i =
+ if i >= numSpecificUnicodeChars then
+ // OK, if we failed then read the 'others' entry in the alphabet,
+ // which covers all Unicode characters not covered in other
+ // ways
+ let baseForUnicodeCategories = numLowUnicodeChars+numSpecificUnicodeChars*2
+ let unicodeCategory = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(inp)
+ //System.Console.WriteLine("inp = {0}, unicodeCategory = {1}", [| box inp; box unicodeCategory |]);
+ int trans.[state].[baseForUnicodeCategories + int32 unicodeCategory]
+ else
+ // This is the specific unicode character
+ let c = char (int trans.[state].[baseForSpecificUnicodeChars+i*2])
+ //System.Console.WriteLine("c = {0}, inp = {1}, i = {2}", [| box c; box inp; box i |]);
+ // OK, have we found the entry for a specific unicode character?
+ if c = inp
+ then int trans.[state].[baseForSpecificUnicodeChars+i*2+1]
+ else loop(i+1)
+
+ loop 0
+ let eofPos = numLowUnicodeChars + 2*numSpecificUnicodeChars + numUnicodeCategories
+
+ let rec scanUntilSentinel(lexBuffer,state) =
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept(lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,eofPos)
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
+
+ // Find the new state
+ let snew = lookupUnicodeCharacters (state,inp)
+
+ if snew = sentinel then
+ lexBuffer.EndOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ // Printf.printf "state %d --> %d on '%c' (%d)\n" s snew (char inp) inp;
+ scanUntilSentinel(lexBuffer,snew)
+
+ // Each row for the Unicode table has format
+ // 128 entries for ASCII characters
+ // A variable number of 2*UInt16 entries for SpecificUnicodeChars
+ // 30 entries, one for each UnicodeCategory
+ // 1 entry for EOF
+
+ member tables.Interpret(initialState,lexBuffer : LexBuffer) =
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) =
+
+ let rec scanUntilSentinel(lexBuffer, state) =
+ async {
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept(lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,eofPos)
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
+
+ // Find the new state
+ let snew = lookupUnicodeCharacters (state,inp)
+
+ if snew = sentinel then
+ return! endOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ return! scanUntilSentinel(lexBuffer, snew)
+ }
+ and endOfScan() =
+ async { return lexBuffer.EndOfScan() }
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ static member Create(trans,accept) = new UnicodeTables(trans,accept)
diff --git a/src/buildtools/fslex/Lexing.fsi b/src/buildtools/fslex/Lexing.fsi
new file mode 100644
index 0000000000..e31ad411aa
--- /dev/null
+++ b/src/buildtools/fslex/Lexing.fsi
@@ -0,0 +1,151 @@
+//==========================================================================
+// LexBuffers are for use with automatically generated lexical analyzers,
+// in particular those produced by 'fslex'.
+//
+// (c) Microsoft Corporation 2005-2008.
+//===========================================================================
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Lexing
+#else
+namespace Microsoft.FSharp.Text.Lexing
+#endif
+
+open System.Collections.Generic
+
+/// Position information stored for lexing tokens
+//
+// Note: this is an OCaml compat record type.
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Position =
+#else
+type Position =
+#endif
+ { /// The file name for the position
+ pos_fname: string;
+ /// The line number for the position
+ pos_lnum: int;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ /// The line number for the position in the original source file
+ pos_orig_lnum : int;
+#endif
+ /// The absolute offset of the beginning of the line
+ pos_bol: int;
+ /// The absolute offset of the column for the position
+ pos_cnum: int; }
+ /// The file name associated with the input stream.
+ member FileName : string
+ /// The line number in the input stream, assuming fresh positions have been updated
+ /// using AsNewLinePos() and by modifying the EndPos property of the LexBuffer.
+ member Line : int
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ /// The line number for the position in the input stream, assuming fresh positions have been updated
+ /// using AsNewLinePos()
+ member OriginalLine : int
+#endif
+ []
+ member Char : int
+ /// The character number in the input stream
+ member AbsoluteOffset : int
+ /// Return absolute offset of the start of the line marked by the position
+ member StartOfLineAbsoluteOffset : int
+ /// Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset
+ member Column : int
+ // Given a position just beyond the end of a line, return a position at the start of the next line
+ member NextLine : Position
+
+ /// Given a position at the start of a token of length n, return a position just beyond the end of the token
+ member EndOfToken: n:int -> Position
+ /// Gives a position shifted by specified number of characters
+ member ShiftColumnBy: by:int -> Position
+
+ []
+ member AsNewLinePos : unit -> Position
+
+ /// Get an arbitrary position, with the empty string as filename, and
+ static member Empty : Position
+
+ /// Get a position corresponding to the first line (line number 1) in a given file
+ static member FirstLine : filename:string -> Position
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal LexBuffer<'char> =
+#else
+/// Input buffers consumed by lexers generated by fslex.exe
+type LexBuffer<'char> =
+#endif
+ /// The start position for the lexeme
+ member StartPos: Position with get,set
+ /// The end position for the lexeme
+ member EndPos: Position with get,set
+ /// The matched string
+ member Lexeme: 'char array
+
+ /// Fast helper to turn the matched characters into a string, avoiding an intermediate array
+ static member LexemeString : LexBuffer -> string
+
+ /// The length of the matched string
+ member LexemeLength: int
+ /// Fetch a particular character in the matched string
+ member LexemeChar: int -> 'char
+
+ /// Dynamically typed, non-lexically scoped parameter table
+ member BufferLocalStore : IDictionary
+
+ /// True if the refill of the buffer ever failed , or if explicitly set to true.
+ member IsPastEndOfStream: bool with get,set
+ /// Remove all input, though don't discard the current lexeme
+ member DiscardInput: unit -> unit
+
+ /// Create a lex buffer suitable for byte lexing that reads characters from the given array
+ static member FromBytes: byte[] -> LexBuffer
+ /// Create a lex buffer suitable for Unicode lexing that reads characters from the given array
+ static member FromChars: char[] -> LexBuffer
+ /// Create a lex buffer suitable for Unicode lexing that reads characters from the given string
+ static member FromString: string -> LexBuffer
+ /// Create a lex buffer that reads character or byte inputs by using the given function
+ static member FromFunction: ('char[] * int * int -> int) -> LexBuffer<'char>
+ /// Create a lex buffer that asynchronously reads character or byte inputs by using the given function
+ static member FromAsyncFunction: ('char[] * int * int -> Async) -> LexBuffer<'char>
+
+
+ [.FromFunction instead")>]
+ static member FromCharFunction: (char[] -> int -> int) -> LexBuffer
+ [.FromFunction instead")>]
+ static member FromByteFunction: (byte[] -> int -> int) -> LexBuffer
+
+ /// Create a lex buffer suitable for use with a Unicode lexer that reads character inputs from the given text reader
+ static member FromTextReader: System.IO.TextReader -> LexBuffer
+ /// Create a lex buffer suitable for use with ASCII byte lexing that reads byte inputs from the given binary reader
+ static member FromBinaryReader: System.IO.BinaryReader -> LexBuffer
+
+
+/// The type of tables for an ascii lexer generated by fslex.
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal AsciiTables =
+#else
+type AsciiTables =
+#endif
+ static member Create : uint16[] array * uint16[] -> AsciiTables
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member Interpret: initialState:int * LexBuffer -> int
+ /// Interpret tables for an ascii lexer generated by fslex, processing input asynchronously
+ member AsyncInterpret: initialState:int * LexBuffer -> Async
+
+
+/// The type of tables for an unicode lexer generated by fslex.
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal UnicodeTables =
+#else
+type UnicodeTables =
+#endif
+ static member Create : uint16[] array * uint16[] -> UnicodeTables
+ /// Interpret tables for a unicode lexer generated by fslex.
+ member Interpret: initialState:int * LexBuffer -> int
+
+ /// Interpret tables for a unicode lexer generated by fslex, processing input asynchronously
+ member AsyncInterpret: initialState:int * LexBuffer -> Async
+
diff --git a/src/buildtools/fslex/Parsing.fs b/src/buildtools/fslex/Parsing.fs
new file mode 100644
index 0000000000..01dccfb610
--- /dev/null
+++ b/src/buildtools/fslex/Parsing.fs
@@ -0,0 +1,514 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+
+namespace Internal.Utilities.Text.Parsing
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+
+#else
+namespace Microsoft.FSharp.Text.Parsing
+open Microsoft.FSharp.Text.Lexing
+#endif
+
+
+
+open System
+open System.Collections.Generic
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal IParseState =
+#else
+type IParseState =
+#endif
+ abstract InputRange: int -> Position * Position
+ abstract InputEndPosition: int -> Position
+ abstract InputStartPosition: int -> Position
+ abstract ResultRange: Position * Position
+ abstract GetInput: int -> obj
+ abstract ParserLocalStore : IDictionary
+ abstract RaiseError<'b> : unit -> 'b
+
+//-------------------------------------------------------------------------
+// This context is passed to the error reporter when a syntax error occurs
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal ParseErrorContext<'tok>
+#else
+type ParseErrorContext<'tok>
+#endif
+ (//lexbuf: LexBuffer<_>,
+ stateStack:int list,
+ parseState: IParseState,
+ reduceTokens: int list,
+ currentToken: 'tok option,
+ reducibleProductions: int list list,
+ shiftableTokens: int list ,
+ message : string) =
+ //member x.LexBuffer = lexbuf
+ member x.StateStack = stateStack
+ member x.ReduceTokens = reduceTokens
+ member x.CurrentToken = currentToken
+ member x.ParseState = parseState
+ member x.ReducibleProductions = reducibleProductions
+ member x.ShiftTokens = shiftableTokens
+ member x.Message = message
+
+
+//-------------------------------------------------------------------------
+// This is the data structure emitted as code by FSYACC.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Tables<'tok> =
+#else
+type Tables<'tok> =
+#endif
+ { reductions: (IParseState -> obj) array;
+ endOfInputTag: int;
+ tagOfToken: 'tok -> int;
+ dataOfToken: 'tok -> obj;
+ actionTableElements: uint16[];
+ actionTableRowOffsets: uint16[];
+ reductionSymbolCounts: uint16[];
+ immediateActions: uint16[];
+ gotos: uint16[];
+ sparseGotoTableRowOffsets: uint16[];
+ stateToProdIdxsTableElements: uint16[];
+ stateToProdIdxsTableRowOffsets: uint16[];
+ productionToNonTerminalTable: uint16[];
+ /// For fsyacc.exe, this entry is filled in by context from the generated parser file. If no 'parse_error' function
+ /// is defined by the user then ParseHelpers.parse_error is used by default (ParseHelpers is opened
+ /// at the top of the generated parser file)
+ parseError: ParseErrorContext<'tok> -> unit;
+ numTerminals: int;
+ tagOfErrorTerminal: int }
+
+//-------------------------------------------------------------------------
+// An implementation of stacks.
+
+// This type is in System.dll so for the moment we can't use it in FSharp.Core.dll
+//type Stack<'a> = System.Collections.Generic.Stack<'a>
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type Stack<'a>(n) =
+#else
+type internal Stack<'a>(n) =
+#endif
+ let mutable contents = Array.zeroCreate<'a>(n)
+ let mutable count = 0
+
+ member buf.Ensure newSize =
+ let oldSize = Array.length contents
+ if newSize > oldSize then
+ let old = contents
+ contents <- Array.zeroCreate (max newSize (oldSize * 2));
+ Array.blit old 0 contents 0 count;
+
+ member buf.Count = count
+ member buf.Pop() = count <- count - 1
+ member buf.Peep() = contents.[count - 1]
+ member buf.Top(n) = [ for x in contents.[max 0 (count-n)..count - 1] -> x ] |> List.rev
+ member buf.Push(x) =
+ buf.Ensure(count + 1);
+ contents.[count] <- x;
+ count <- count + 1
+
+ member buf.IsEmpty = (count = 0)
+#if __DEBUG
+ member buf.PrintStack() =
+ for i = 0 to (count - 1) do
+#if FX_NO_CONSOLE
+ ()
+#else
+ System.Console.Write("{0}{1}",(contents.[i]),if i=count-1 then ":" else "-")
+#endif
+#endif
+exception RecoverableParseError
+exception Accept of obj
+
+#if __DEBUG
+module Flags =
+ let mutable debug = false
+#endif
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+module internal Implementation =
+#else
+module Implementation =
+#endif
+
+ // Definitions shared with fsyacc
+ let anyMarker = 0xffff
+ let shiftFlag = 0x0000
+ let reduceFlag = 0x4000
+ let errorFlag = 0x8000
+ let acceptFlag = 0xc000
+ let actionMask = 0xc000
+
+ let actionValue action = action &&& (~~~ actionMask)
+ let actionKind action = action &&& actionMask
+
+ //-------------------------------------------------------------------------
+ // Read the tables written by FSYACC.
+
+ type AssocTable(elemTab:uint16[], offsetTab:uint16[]) =
+ let cache = new Dictionary<_,_>(2000)
+
+ member t.readAssoc (minElemNum,maxElemNum,defaultValueOfAssoc,keyToFind) =
+ // do a binary chop on the table
+ let elemNumber : int = (minElemNum+maxElemNum)/2
+ if elemNumber = maxElemNum
+ then defaultValueOfAssoc
+ else
+ let x = int elemTab.[elemNumber*2]
+ if keyToFind = x then
+ int elemTab.[elemNumber*2+1]
+ elif keyToFind < x then t.readAssoc (minElemNum ,elemNumber,defaultValueOfAssoc,keyToFind)
+ else t.readAssoc (elemNumber+1,maxElemNum,defaultValueOfAssoc,keyToFind)
+
+ member t.Read(rowNumber ,keyToFind) =
+
+ // First check the sparse lookaside table
+ // Performance note: without this lookaside table the binary chop in readAssoc
+ // takes up around 10% of of parsing time
+ // for parsing intensive samples such as the bootstrapped F# compiler.
+ //
+ // Note: using a .NET Dictionary for this int -> int table looks like it could be sub-optimal.
+ // Some other better sparse lookup table may be better.
+ let mutable res = 0
+ let cacheKey = (rowNumber <<< 16) ||| keyToFind
+ let ok = cache.TryGetValue(cacheKey, &res)
+ if ok then res
+ else
+ let headOfTable = int offsetTab.[rowNumber]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElementsInAssoc = int elemTab.[headOfTable*2]
+ let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]
+ let res = t.readAssoc (firstElemNumber,(firstElemNumber+numberOfElementsInAssoc),defaultValueOfAssoc,keyToFind)
+ cache.[cacheKey] <- res
+ res
+
+ // Read all entries in the association table
+ // Used during error recovery to find all valid entries in the table
+ member x.ReadAll(n) =
+ let headOfTable = int offsetTab.[n]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElementsInAssoc = int32 elemTab.[headOfTable*2]
+ let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]
+ [ for i in firstElemNumber .. (firstElemNumber+numberOfElementsInAssoc-1) ->
+ (int elemTab.[i*2], int elemTab.[i*2+1]) ], defaultValueOfAssoc
+
+ type IdxToIdxListTable(elemTab:uint16[], offsetTab:uint16[]) =
+
+ // Read all entries in a row of the table
+ member x.ReadAll(n) =
+ let headOfTable = int offsetTab.[n]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElements = int32 elemTab.[headOfTable]
+ [ for i in firstElemNumber .. (firstElemNumber+numberOfElements-1) -> int elemTab.[i] ]
+
+ //-------------------------------------------------------------------------
+ // interpret the tables emitted by FSYACC.
+
+ [