diff --git a/fcs/Directory.Build.props b/fcs/Directory.Build.props
index 2841a5fb34f..3afd56797b3 100644
--- a/fcs/Directory.Build.props
+++ b/fcs/Directory.Build.props
@@ -32,6 +32,5 @@
$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools
fsi.exe
4.6.2
- net461
diff --git a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
deleted file mode 100644
index ad6a9d7cd62..00000000000
--- a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- $(FcsTargetNetFxFramework)
- true
- $(DefineConstants);CROSS_PLATFORM_COMPILER
- $(DefineConstants);ENABLE_MONO_SUPPORT
-
-
- Additional DLL for legacy compat for the F# compiler service.
- Additional DLL for legacy compat for the F# compiler service.
- false
- Microsoft Corporation; F# community contributors
- https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
- https://github.com/fsharp/FSharp.Compiler.Service
- logo.png
- F#, compiler, msbuild
-
-
-
-
- Service/MSBuildReferenceResolver.fs
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
deleted file mode 100644
index b12fa10ee5b..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- $(FcsTargetNetFxFramework)
- true
-
-
- Legacy project file cracker for the F# compiler service.
- Legacy project file cracker for the F# compiler service.
- false
- Microsoft Corporation; F# community contributors
- https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE
- https://github.com/fsharp/FSharp.Compiler.Service
- logo.png
- F#, compiler, msbuild
-
-
-
-
- ProjectCrackerOptions.fs
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs b/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs
deleted file mode 100644
index 3a096cb5660..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs
+++ /dev/null
@@ -1,127 +0,0 @@
-namespace FSharp.Compiler.SourceCodeServices
-
-#if !NETSTANDARD
-open System.Runtime.Serialization.Json
-#endif
-open System.Text
-open System.IO
-open System
-
-module Utils =
-
- let Convert loadedTimeStamp (originalOpts: ProjectCrackerTool.ProjectOptions) =
- let logMap = ref Map.empty
-
- let rec convertProject (opts: ProjectCrackerTool.ProjectOptions) =
- if not (isNull opts.Error) then failwith opts.Error
-
- let referencedProjects() = Array.map (fun (a, b) -> a,convertProject b) opts.ReferencedProjectOptions
-
- let sourceFiles, otherOptions =
- opts.Options
- |> Array.partition (fun x ->
- let extension = Path.GetExtension(x).ToLower()
- x.IndexOfAny(Path.GetInvalidPathChars()) = -1
- && (extension = ".fs" || extension = ".fsi"))
-
- let sepChar = Path.DirectorySeparatorChar
-
- let sourceFiles = sourceFiles |> Array.map (fun x ->
- match sepChar with
- | '\\' -> x.Replace('/', '\\')
- | '/' -> x.Replace('\\', '/')
- | _ -> x
- )
-
- logMap := Map.add opts.ProjectFile opts.LogOutput !logMap
- { ProjectFileName = opts.ProjectFile
- ProjectId = None
- SourceFiles = sourceFiles
- OtherOptions = otherOptions
- ReferencedProjects = referencedProjects()
- IsIncompleteTypeCheckEnvironment = false
- UseScriptResolutionRules = false
- LoadTime = loadedTimeStamp
- UnresolvedReferences = None
- OriginalLoadReferences = []
- ExtraProjectInfo = None
- Stamp = None }
-
- convertProject originalOpts, !logMap
-
-type ProjectCracker =
-
- static member GetProjectOptionsFromProjectFileLogged(projectFileName : string, ?properties : (string * string) list, ?loadedTimeStamp, ?enableLogging) =
- let loadedTimeStamp = defaultArg loadedTimeStamp DateTime.MaxValue // Not 'now', we don't want to force reloading
- let properties = defaultArg properties []
- let enableLogging = defaultArg enableLogging true
-
-
-#if NETSTANDARD
- let arguments = [|
- yield projectFileName
- yield enableLogging.ToString()
- for k, v in properties do
- yield k
- yield v
- |]
-
- let ret, opts = FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.ProjectCrackerTool.crackOpen arguments
- ignore ret
-#else
- let arguments = new StringBuilder()
- arguments.Append('"').Append(projectFileName).Append('"') |> ignore
- arguments.Append(' ').Append(enableLogging.ToString()) |> ignore
- for k, v in properties do
- arguments.Append(' ').Append(k).Append(' ').Append(v) |> ignore
- let codebase = Path.GetDirectoryName(Uri(typeof.Assembly.CodeBase).LocalPath)
-
- let crackerFilename = Path.Combine(codebase,"FSharp.Compiler.Service.ProjectCrackerTool.exe")
- if not (File.Exists crackerFilename) then
- failwithf "ProjectCracker exe not found at: %s it must be next to the ProjectCracker dll." crackerFilename
-
- let p = new System.Diagnostics.Process()
-
- p.StartInfo.FileName <- crackerFilename
- p.StartInfo.Arguments <- arguments.ToString()
- p.StartInfo.UseShellExecute <- false
- p.StartInfo.CreateNoWindow <- true
- p.StartInfo.RedirectStandardOutput <- true
- p.StartInfo.RedirectStandardError <- true
-
- let sbOut = StringBuilder()
- let sbErr = StringBuilder()
-
- p.ErrorDataReceived.AddHandler(fun _ a -> sbErr.AppendLine a.Data |> ignore)
- p.OutputDataReceived.AddHandler(fun _ a -> sbOut.AppendLine a.Data |> ignore)
-
- ignore <| p.Start()
-
- p.EnableRaisingEvents <- true
- p.BeginOutputReadLine()
- p.BeginErrorReadLine()
-
- p.WaitForExit()
-
- let crackerOut = sbOut.ToString()
- let crackerErr = sbErr.ToString()
-
- let opts =
- try
- let ser = new DataContractJsonSerializer(typeof)
- let stringBytes = Encoding.Unicode.GetBytes crackerOut
- use ms = new MemoryStream(stringBytes)
- ser.ReadObject(ms) :?> ProjectCrackerTool.ProjectOptions
- with
- exn ->
- raise (Exception(sprintf "error parsing ProjectCrackerTool output, stdoutput was:\n%s\n\nstderr was:\n%s" crackerOut crackerErr, exn))
-#endif
-
- Utils.Convert loadedTimeStamp opts
-
- static member GetProjectOptionsFromProjectFile(projectFileName : string, ?properties : (string * string) list, ?loadedTimeStamp) =
- fst (ProjectCracker.GetProjectOptionsFromProjectFileLogged(
- projectFileName,
- ?properties=properties,
- ?loadedTimeStamp=loadedTimeStamp,
- enableLogging=false))
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/App.config b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/App.config
deleted file mode 100644
index fdab151af22..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/App.config
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
deleted file mode 100644
index ed01293adaf..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
deleted file mode 100644
index 19789a96299..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- Exe
- $(FcsTargetNetFxFramework)
- true
- $(DefineConstants);CROSS_PLATFORM_COMPILER
- $(DefineConstants);ENABLE_MONO_SUPPORT
- $(OtherFlags) --staticlink:FSharp.Core
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs
deleted file mode 100644
index 8379737c939..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs
+++ /dev/null
@@ -1,46 +0,0 @@
-namespace FSharp.Compiler.SourceCodeServices.ProjectCrackerTool
-
-open System
-open System.Reflection
-open System.Runtime.Serialization.Json
-
-module Program =
-
-#if !NETCOREAPP2_0
- let addMSBuildv14BackupResolution () =
- let onResolveEvent = new ResolveEventHandler(fun sender evArgs ->
- let requestedAssembly = AssemblyName(evArgs.Name)
- if requestedAssembly.Name.StartsWith("Microsoft.Build", StringComparison.Ordinal) &&
- not (requestedAssembly.Name.EndsWith(".resources", StringComparison.Ordinal)) &&
- not (requestedAssembly.Version.ToString().Contains("12.0.0.0"))
- then
- // If the version of MSBuild that we're using wasn't present on the machine, then
- // just revert back to 12.0.0.0 since that's normally installed as part of the .NET
- // Framework.
- requestedAssembly.Version <- Version("12.0.0.0")
- Assembly.Load requestedAssembly
- else
- null)
- AppDomain.CurrentDomain.add_AssemblyResolve(onResolveEvent)
-#endif
-
- let crackAndSendOutput asText argv =
- let ret, opts = ProjectCrackerTool.crackOpen argv
-
- if asText then
- printfn "%A" opts
- else
- let ser = new DataContractJsonSerializer(typeof)
- ser.WriteObject(Console.OpenStandardOutput(), opts)
- ret
-
-
- [][]
- let main argv =
- let asText = Array.exists (fun (s: string) -> s = "--text") argv
- let argv = Array.filter (fun (s: string) -> s <> "--text") argv
-
-#if !NETCOREAPP2_0
- addMSBuildv14BackupResolution ()
-#endif
- crackAndSendOutput asText argv
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerOptions.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerOptions.fs
deleted file mode 100644
index a48bdc25aa7..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerOptions.fs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace FSharp.Compiler.SourceCodeServices.ProjectCrackerTool
-
-[]
-type ProjectOptions =
- {
- ProjectFile: string
- Options: string[]
- ReferencedProjectOptions: (string * ProjectOptions)[]
- LogOutput: string
- Error: string
- }
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs
deleted file mode 100644
index 93a74cbb0e8..00000000000
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs
+++ /dev/null
@@ -1,471 +0,0 @@
-namespace FSharp.Compiler.SourceCodeServices.ProjectCrackerTool
-
-open System
-open System.IO
-open System.Text
-open Microsoft.Build.Framework
-open Microsoft.Build.Utilities
-
-module internal ProjectCrackerTool =
- open System.Collections.Generic
-
- let runningOnMono =
-#if NETCOREAPP2_0
- false
-#else
- try match System.Type.GetType("Mono.Runtime") with null -> false | _ -> true
- with e -> false
-#endif
-
- type internal BasicStringLogger() =
- inherit Logger()
-
- let sb = new StringBuilder()
-
- let log (e: BuildEventArgs) =
- sb.Append(e.Message) |> ignore
- sb.AppendLine() |> ignore
-
- override x.Initialize(eventSource:IEventSource) =
- sb.Clear() |> ignore
- eventSource.AnyEventRaised.Add(log)
-
- member x.Log = sb.ToString()
-
- type internal HostCompile() =
- member th.Compile(_:obj, _:obj, _:obj) = 0
- interface ITaskHost
-
- let vs =
- let programFiles =
- let getEnv v =
- let result = System.Environment.GetEnvironmentVariable(v)
- match result with
- | null -> None
- | _ -> Some result
-
- match List.tryPick getEnv [ "ProgramFiles(x86)"; "ProgramFiles" ] with
- | Some r -> r
- | None -> "C:\\Program Files (x86)"
-
- let vsVersions = ["14.0"; "12.0"]
- let msbuildBin v = IO.Path.Combine(programFiles, "MSBuild", v, "Bin", "MSBuild.exe")
- List.tryFind (fun v -> IO.File.Exists(msbuildBin v)) vsVersions
-
- let mkAbsolute dir v =
- if Path.IsPathRooted v then v
- else Path.Combine(dir, v)
-
- let mkAbsoluteOpt dir v = Option.map (mkAbsolute dir) v
-
- let CrackProjectUsingNewBuildAPI fsprojFile properties logOpt =
- let fsprojFullPath = try Path.GetFullPath(fsprojFile) with _ -> fsprojFile
- let fsprojAbsDirectory = Path.GetDirectoryName fsprojFullPath
-
- use _pwd =
- let dir = Directory.GetCurrentDirectory()
- Directory.SetCurrentDirectory(fsprojAbsDirectory)
- { new System.IDisposable with
- member x.Dispose() = Directory.SetCurrentDirectory(dir) }
- use engine = new Microsoft.Build.Evaluation.ProjectCollection()
- let host = new HostCompile()
-
- engine.HostServices.RegisterHostObject(fsprojFullPath, "CoreCompile", "Fsc", host)
-
- let projectInstanceFromFullPath (fsprojFullPath: string) =
- use file = new FileStream(fsprojFullPath, FileMode.Open, FileAccess.Read, FileShare.Read)
- use stream = new StreamReader(file)
- use xmlReader = System.Xml.XmlReader.Create(stream)
-
- let project =
- try
- engine.LoadProject(xmlReader, FullPath=fsprojFullPath)
- with
- | exn ->
- let tools = engine.Toolsets |> Seq.map (fun x -> x.ToolsPath) |> Seq.toList
- raise (new Exception(sprintf "Could not load project %s in ProjectCollection. Available tools: %A. Message: %s" fsprojFullPath tools exn.Message))
-
- project.SetGlobalProperty("BuildingInsideVisualStudio", "true") |> ignore
- if not (List.exists (fun (p,_) -> p = "VisualStudioVersion") properties) then
- match vs with
- | Some version -> project.SetGlobalProperty("VisualStudioVersion", version) |> ignore
- | None -> ()
- project.SetGlobalProperty("ShouldUnsetParentConfigurationAndPlatform", "false") |> ignore
- for (prop, value) in properties do
- project.SetGlobalProperty(prop, value) |> ignore
-
- project.CreateProjectInstance()
-
- let project = projectInstanceFromFullPath fsprojFullPath
- let directory = project.Directory
-
- let getprop (p: Microsoft.Build.Execution.ProjectInstance) s =
- let v = p.GetPropertyValue s
- if String.IsNullOrWhiteSpace v then None
- else Some v
-
- let outFileOpt = getprop project "TargetPath"
-
- let log = match logOpt with
- | None -> []
- | Some l -> [l :> ILogger]
-
- project.Build([| "Build" |], log) |> ignore
-
- let getItems s = [ for f in project.GetItems(s) -> mkAbsolute directory f.EvaluatedInclude ]
-
- let projectReferences =
- [ for cp in project.GetItems("ProjectReference") do
- yield cp.GetMetadataValue("FullPath")
- ]
-
- let references =
- [ for i in project.GetItems("ReferencePath") do
- yield i.EvaluatedInclude
- for i in project.GetItems("ChildProjectReferences") do
- yield i.EvaluatedInclude ]
-
- outFileOpt, directory, getItems, references, projectReferences, getprop project, project.FullPath
-
-#if !NETCOREAPP2_0
- let CrackProjectUsingOldBuildAPI (fsprojFile:string) properties logOpt =
- let engine = new Microsoft.Build.BuildEngine.Engine()
- Option.iter (fun l -> engine.RegisterLogger(l)) logOpt
-
- let bpg = Microsoft.Build.BuildEngine.BuildPropertyGroup()
-
- bpg.SetProperty("BuildingInsideVisualStudio", "true")
- for (prop, value) in properties do
- bpg.SetProperty(prop, value)
-
- engine.GlobalProperties <- bpg
-
- let projectFromFile (fsprojFile:string) =
- // We seem to need to pass 12.0/4.0 in here for some unknown reason
- let project = new Microsoft.Build.BuildEngine.Project(engine, engine.DefaultToolsVersion)
- do project.Load(fsprojFile)
- project
-
- let project = projectFromFile fsprojFile
- project.Build([| "ResolveReferences" |]) |> ignore
- let directory = Path.GetDirectoryName project.FullFileName
-
- let getProp (p: Microsoft.Build.BuildEngine.Project) s =
- let v = p.GetEvaluatedProperty s
- if String.IsNullOrWhiteSpace v then None
- else Some v
-
- let outFileOpt =
- match mkAbsoluteOpt directory (getProp project "OutDir") with
- | None -> None
- | Some d -> mkAbsoluteOpt d (getProp project "TargetFileName")
-
- let getItems s =
- let fs = project.GetEvaluatedItemsByName(s)
- [ for f in fs -> mkAbsolute directory f.FinalItemSpec ]
-
- let projectReferences =
- [ for i in project.GetEvaluatedItemsByName("ProjectReference") do
- yield mkAbsolute directory i.FinalItemSpec
- ]
-
- let references =
- [ for i in project.GetEvaluatedItemsByName("ReferencePath") do
- yield i.FinalItemSpec
- for i in project.GetEvaluatedItemsByName("ChildProjectReferences") do
- yield i.FinalItemSpec ]
- // Duplicate slashes sometimes appear in the output here, which prevents
- // them from matching keys used in FSharpProjectOptions.ReferencedProjects
- |> List.map (fun (s: string) -> s.Replace("//","/"))
-
- outFileOpt, directory, getItems, references, projectReferences, getProp project, project.FullFileName
-
-#endif
-
- //----------------------------------------------------------------------------
- // FSharpProjectFileInfo
- //
- []
- type FSharpProjectFileInfo (fsprojFileName:string, ?properties, ?enableLogging) =
- let properties = defaultArg properties []
- let enableLogging = defaultArg enableLogging false
-
- let logOpt =
- if enableLogging then
- let log = new BasicStringLogger()
- do log.Verbosity <- Microsoft.Build.Framework.LoggerVerbosity.Diagnostic
- Some log
- else
- None
-
- let outFileOpt, directory, getItems, references, projectReferences, getProp, fsprojFullPath =
- try
-#if NETCOREAPP2_0
- CrackProjectUsingNewBuildAPI fsprojFileName properties logOpt
- with
-#else
- if runningOnMono then
- CrackProjectUsingOldBuildAPI fsprojFileName properties logOpt
- else
- CrackProjectUsingNewBuildAPI fsprojFileName properties logOpt
- with
- | :? Microsoft.Build.BuildEngine.InvalidProjectFileException as e ->
- raise (Microsoft.Build.Exceptions.InvalidProjectFileException(
- e.ProjectFile,
- e.LineNumber,
- e.ColumnNumber,
- e.EndLineNumber,
- e.EndColumnNumber,
- e.Message,
- e.ErrorSubcategory,
- e.ErrorCode,
- e.HelpKeyword))
-#endif
- | :? ArgumentException as e -> raise (IO.FileNotFoundException(e.Message))
-
- let logOutput = match logOpt with None -> "" | Some l -> l.Log
- let pages = getItems "Page"
- let embeddedResources = getItems "EmbeddedResource"
- let files = getItems "Compile"
- let resources = getItems "Resource"
- let noaction = getItems "None"
- let content = getItems "Content"
-
- let split (s : string option) (cs : char []) =
- match s with
- | None -> [||]
- | Some s ->
- if String.IsNullOrWhiteSpace s then [||]
- else s.Split(cs, StringSplitOptions.RemoveEmptyEntries)
-
- let getbool (s : string option) =
- match s with
- | None -> false
- | Some s ->
- match (Boolean.TryParse s) with
- | (true, result) -> result
- | (false, _) -> false
-
- let fxVer = getProp "TargetFrameworkVersion"
- let optimize = getProp "Optimize" |> getbool
- let assemblyNameOpt = getProp "AssemblyName"
- let tailcalls = getProp "Tailcalls" |> getbool
- let outputPathOpt = getProp "OutputPath"
- let docFileOpt = getProp "DocumentationFile"
- let outputTypeOpt = getProp "OutputType"
- let debugTypeOpt = getProp "DebugType"
- let baseAddressOpt = getProp "BaseAddress"
- let sigFileOpt = getProp "GenerateSignatureFile"
- let keyFileOpt = getProp "KeyFile"
- let pdbFileOpt = getProp "PdbFile"
- let platformOpt = getProp "Platform"
- let targetTypeOpt = getProp "TargetType"
- let versionFileOpt = getProp "VersionFile"
- let targetProfileOpt = getProp "TargetProfile"
- let warnLevelOpt = getProp "Warn"
- let subsystemVersionOpt = getProp "SubsystemVersion"
- let win32ResOpt = getProp "Win32ResourceFile"
- let heOpt = getProp "HighEntropyVA" |> getbool
- let win32ManifestOpt = getProp "Win32ManifestFile"
- let debugSymbols = getProp "DebugSymbols" |> getbool
- let prefer32bit = getProp "Prefer32Bit" |> getbool
- let warnAsError = getProp "TreatWarningsAsErrors" |> getbool
- let defines = split (getProp "DefineConstants") [| ';'; ','; ' ' |]
- let nowarn = split (getProp "NoWarn") [| ';'; ','; ' ' |]
- let warningsAsError = split (getProp "WarningsAsErrors") [| ';'; ','; ' ' |]
- let libPaths = split (getProp "ReferencePath") [| ';'; ',' |]
- let otherFlags = split (getProp "OtherFlags") [| ' ' |]
- let isLib = (outputTypeOpt = Some "Library")
-
- let docFileOpt =
- match docFileOpt with
- | None -> None
- | Some docFile -> Some(mkAbsolute directory docFile)
-
-
- let options =
- [ yield "--simpleresolution"
- yield "--noframework"
- match outFileOpt with
- | None -> ()
- | Some outFile -> yield "--out:" + outFile
- match docFileOpt with
- | None -> ()
- | Some docFile -> yield "--doc:" + docFile
- match baseAddressOpt with
- | None -> ()
- | Some baseAddress -> yield "--baseaddress:" + baseAddress
- match keyFileOpt with
- | None -> ()
- | Some keyFile -> yield "--keyfile:" + keyFile
- match sigFileOpt with
- | None -> ()
- | Some sigFile -> yield "--sig:" + sigFile
- match pdbFileOpt with
- | None -> ()
- | Some pdbFile -> yield "--pdb:" + pdbFile
- match versionFileOpt with
- | None -> ()
- | Some versionFile -> yield "--versionfile:" + versionFile
- match warnLevelOpt with
- | None -> ()
- | Some warnLevel -> yield "--warn:" + warnLevel
- match subsystemVersionOpt with
- | None -> ()
- | Some s -> yield "--subsystemversion:" + s
- if heOpt then yield "--highentropyva+"
- match win32ResOpt with
- | None -> ()
- | Some win32Res -> yield "--win32res:" + win32Res
- match win32ManifestOpt with
- | None -> ()
- | Some win32Manifest -> yield "--win32manifest:" + win32Manifest
- match targetProfileOpt with
- | None -> ()
- | Some targetProfile -> yield "--targetprofile:" + targetProfile
- yield "--fullpaths"
- yield "--flaterrors"
- if warnAsError then yield "--warnaserror"
- yield
- if isLib then "--target:library"
- else "--target:exe"
- for symbol in defines do
- if not (String.IsNullOrWhiteSpace symbol) then yield "--define:" + symbol
- for nw in nowarn do
- if not (String.IsNullOrWhiteSpace nw) then yield "--nowarn:" + nw
- for nw in warningsAsError do
- if not (String.IsNullOrWhiteSpace nw) then yield "--warnaserror:" + nw
- yield if debugSymbols then "--debug+"
- else "--debug-"
- yield if optimize then "--optimize+"
- else "--optimize-"
- yield if tailcalls then "--tailcalls+"
- else "--tailcalls-"
- match debugTypeOpt with
- | None -> ()
- | Some debugType ->
- match debugType.ToUpperInvariant() with
- | "NONE" -> ()
- | "PDBONLY" -> yield "--debug:pdbonly"
- | "FULL" -> yield "--debug:full"
- | _ -> ()
- match platformOpt |> Option.map (fun o -> o.ToUpperInvariant()), prefer32bit,
- targetTypeOpt |> Option.map (fun o -> o.ToUpperInvariant()) with
- | Some "ANYCPU", true, Some "EXE" | Some "ANYCPU", true, Some "WINEXE" -> yield "--platform:anycpu32bitpreferred"
- | Some "ANYCPU", _, _ -> yield "--platform:anycpu"
- | Some "X86", _, _ -> yield "--platform:x86"
- | Some "X64", _, _ -> yield "--platform:x64"
- | Some "ITANIUM", _, _ -> yield "--platform:Itanium"
- | _ -> ()
- match targetTypeOpt |> Option.map (fun o -> o.ToUpperInvariant()) with
- | Some "LIBRARY" -> yield "--target:library"
- | Some "EXE" -> yield "--target:exe"
- | Some "WINEXE" -> yield "--target:winexe"
- | Some "MODULE" -> yield "--target:module"
- | _ -> ()
- yield! otherFlags
- for f in resources do
- yield "--resource:" + f
- for i in libPaths do
- yield "--lib:" + mkAbsolute directory i
- for r in references do
- yield "-r:" + r
- yield! files ]
-
- member x.Options = options
- member x.FrameworkVersion = fxVer
- member x.ProjectReferences = projectReferences
- member x.References = references
- member x.CompileFiles = files
- member x.ResourceFiles = resources
- member x.EmbeddedResourceFiles = embeddedResources
- member x.ContentFiles = content
- member x.OtherFiles = noaction
- member x.PageFiles = pages
- member x.OutputFile = outFileOpt
- member x.Directory = directory
- member x.AssemblyName = assemblyNameOpt
- member x.OutputPath = outputPathOpt
- member x.FullPath = fsprojFullPath
- member x.LogOutput = logOutput
- static member Parse(fsprojFileName:string, ?properties, ?enableLogging) = new FSharpProjectFileInfo(fsprojFileName, ?properties=properties, ?enableLogging=enableLogging)
-
- let getOptions file enableLogging properties =
- let cache = new Dictionary<_,_>()
- let rec getOptions file : Option * ProjectOptions =
- match cache.TryGetValue file with
- | true, option -> option
- | _ ->
- let parsedProject = FSharpProjectFileInfo.Parse(file, properties=properties, enableLogging=enableLogging)
-
- let referencedProjectOptions =
- [| for file in parsedProject.ProjectReferences do
- if Path.GetExtension(file) = ".fsproj" then
- match getOptions file with
- | Some outFile, opts -> yield outFile, opts
- | None, _ -> () |]
-
- // Workaround for Mono 4.2, which doesn't populate the subproject
- // details anymore outside of a solution context. See https://github.com/mono/mono/commit/76c6a08e730393927b6851709cdae1d397cbcc3a#diff-59afd196a55d61d5d1eaaef7bd49d1e5
- // and some explanation from the author at https://github.com/fsharp/FSharp.Compiler.Service/pull/455#issuecomment-154103963
- //
- // In particular we want the output path, which we can get from
- // fully parsing that project itself. We also have to specially parse
- // C# referenced projects, as we don't look at them otherwise.
- let referencedProjectOutputs =
- if runningOnMono then
- [ yield! Array.map (fun (s,_) -> "-r:" + s) referencedProjectOptions
- for file in parsedProject.ProjectReferences do
- let ext = Path.GetExtension(file)
- if ext = ".csproj" || ext = ".vbproj" then
- let parsedProject = FSharpProjectFileInfo.Parse(file, properties=properties, enableLogging=false)
- match parsedProject.OutputFile with
- | None -> ()
- | Some f -> yield "-r:" + f ]
- else
- []
-
- // On some versions of Mono the referenced projects are already
- // correctly included, so we make sure not to introduce duplicates
- |> List.filter (fun r -> not (Set.contains r (set parsedProject.Options)))
-
- let options = { ProjectFile = file
- Options = Array.ofSeq (parsedProject.Options @ referencedProjectOutputs)
- ReferencedProjectOptions = referencedProjectOptions
- LogOutput = parsedProject.LogOutput
- Error = null }
-
- let result = parsedProject.OutputFile, options
- cache.Add(file,result)
- result
-
- snd (getOptions file)
-
-
- let rec pairs l =
- match l with
- | [] | [_] -> []
- | x::y::rest -> (x,y) :: pairs rest
-
- let crackOpen (argv: string[])=
- if argv.Length >= 2 then
- let projectFile = argv.[0]
- let enableLogging = match Boolean.TryParse(argv.[1]) with
- | true, true -> true
- | _ -> false
- try
- let props = pairs (List.ofArray argv.[2..])
- let opts = getOptions argv.[0] enableLogging props
- 0, opts
- with e ->
- 2, { ProjectFile = projectFile;
- Options = [||];
- ReferencedProjectOptions = [||];
- LogOutput = e.ToString() + " StackTrace: " + e.StackTrace
- Error = e.Message + " StackTrace: " + e.StackTrace }
- else
- 1, { ProjectFile = "";
- Options = [||];
- ReferencedProjectOptions = [||];
- LogOutput = "At least two arguments required."
- Error = null }
diff --git a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
index 534a1435415..290b5a2741b 100644
--- a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
+++ b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
@@ -1,7 +1,6 @@
-
- $(FcsTargetNetFxFramework);netstandard2.0
+ netstandard2.0
false
$(NoWarn);0067;1591
diff --git a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
index d6c71b55456..10a336332fa 100644
--- a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
+++ b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
@@ -1,9 +1,9 @@
-
- $(FcsTargetNetFxFramework);netcoreapp2.0
+ netcoreapp2.0
true
4.1.19
+ $(DefineConstants);NO_PROJECTCRACKER
$(NoWarn);44;75;
true
true
@@ -11,9 +11,6 @@
true
true
-
- $(DefineConstants);NO_PROJECTCRACKER
-
FsUnit.fs
@@ -83,23 +80,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.sln b/fcs/FSharp.Compiler.Service.sln
index 192f8bd6242..49aacbe4c51 100644
--- a/fcs/FSharp.Compiler.Service.sln
+++ b/fcs/FSharp.Compiler.Service.sln
@@ -7,9 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{B6B6
build.cmd = build.cmd
build.fsx = build.fsx
build.sh = build.sh
- nuget\FSharp.Compiler.Service.MSBuild.v12.nuspec = nuget\FSharp.Compiler.Service.MSBuild.v12.nuspec
nuget\FSharp.Compiler.Service.nuspec = nuget\FSharp.Compiler.Service.nuspec
- nuget\FSharp.Compiler.Service.ProjectCracker.nuspec = nuget\FSharp.Compiler.Service.ProjectCracker.nuspec
paket.dependencies = paket.dependencies
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
@@ -49,16 +47,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tokenizer", "samples\Tokeni
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", "FSharp.Compiler.Service.Tests\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
@@ -74,8 +64,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{9020
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}"
@@ -102,30 +90,10 @@ Global
{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
@@ -144,8 +112,6 @@ Global
{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}
diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
index 8f849da41b3..722a92b15c1 100644
--- a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
+++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
@@ -1,14 +1,20 @@
-
- $(FcsTargetNetFxFramework);netstandard2.0
+ netstandard2.0
true
$(DefineConstants);COMPILER_SERVICE_AS_DLL
$(DefineConstants);COMPILER
$(DefineConstants);ENABLE_MONO_SUPPORT
$(DefineConstants);NO_STRONG_NAMES
$(DefineConstants);LOCALIZATION_FSCOMP
+ $(DefineConstants);FX_NO_PDB_READER
+ $(DefineConstants);FX_NO_PDB_WRITER
+ $(DefineConstants);FX_NO_SYMBOLSTORE
+ $(DefineConstants);FX_NO_APP_DOMAINS
+ $(DefineConstants);FX_NO_WIN_REGISTRY
+ $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION
+ $(DefineConstants);FX_RESHAPED_REFEMIT
$(TargetFramework)\
$(TargetFramework)\
$(OtherFlags) /warnon:1182
@@ -28,15 +34,6 @@
logo.png
F#, fsharp, interactive, compiler, editor
-
- $(DefineConstants);FX_NO_PDB_READER
- $(DefineConstants);FX_NO_PDB_WRITER
- $(DefineConstants);FX_NO_SYMBOLSTORE
- $(DefineConstants);FX_NO_APP_DOMAINS
- $(DefineConstants);FX_NO_WIN_REGISTRY
- $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION
- $(DefineConstants);FX_RESHAPED_REFEMIT
-
@@ -223,13 +220,9 @@
AbsIL/ilmorph.fs
-
-
AbsIL/ilsign.fs
-
-
AbsIL/ilnativeres.fsi
@@ -670,25 +663,16 @@
-
-
-
-
-
+
+
+
-
-
-
-
-
- $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll
-
-
+
\ No newline at end of file
diff --git a/fcs/docsrc/content/caches.fsx b/fcs/docsrc/content/caches.fsx
index 2f63c4b394e..6ea415bcfa5 100644
--- a/fcs/docsrc/content/caches.fsx
+++ b/fcs/docsrc/content/caches.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Notes on the FSharpChecker caches
=================================================
diff --git a/fcs/docsrc/content/compiler.fsx b/fcs/docsrc/content/compiler.fsx
index a7e5303a06b..9688f0b01c7 100644
--- a/fcs/docsrc/content/compiler.fsx
+++ b/fcs/docsrc/content/compiler.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Hosted Compiler
===============
diff --git a/fcs/docsrc/content/corelib.fsx b/fcs/docsrc/content/corelib.fsx
index a0c1e85f029..e8041369ea0 100644
--- a/fcs/docsrc/content/corelib.fsx
+++ b/fcs/docsrc/content/corelib.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Notes on FSharp.Core.dll
=================================================
diff --git a/fcs/docsrc/content/editor.fsx b/fcs/docsrc/content/editor.fsx
index 46ddd882e58..f384c05cfda 100644
--- a/fcs/docsrc/content/editor.fsx
+++ b/fcs/docsrc/content/editor.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Editor services
==================================
diff --git a/fcs/docsrc/content/filesystem.fsx b/fcs/docsrc/content/filesystem.fsx
index ad0a57712b9..73066ba828f 100644
--- a/fcs/docsrc/content/filesystem.fsx
+++ b/fcs/docsrc/content/filesystem.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Virtualized File System
==========================================
diff --git a/fcs/docsrc/content/interactive.fsx b/fcs/docsrc/content/interactive.fsx
index 6226bcbee16..30f0c8a2f08 100644
--- a/fcs/docsrc/content/interactive.fsx
+++ b/fcs/docsrc/content/interactive.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Interactive Service: Embedding F# Interactive
=============================================
diff --git a/fcs/docsrc/content/ja/compiler.fsx b/fcs/docsrc/content/ja/compiler.fsx
index 788c715294f..b69668d42c6 100644
--- a/fcs/docsrc/content/ja/compiler.fsx
+++ b/fcs/docsrc/content/ja/compiler.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラの組み込み
====================
diff --git a/fcs/docsrc/content/ja/corelib.fsx b/fcs/docsrc/content/ja/corelib.fsx
index ea9ee87f8fb..d0dad506c3a 100644
--- a/fcs/docsrc/content/ja/corelib.fsx
+++ b/fcs/docsrc/content/ja/corelib.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラサービス: FSharp.Core.dll についてのメモ
==================================================
diff --git a/fcs/docsrc/content/ja/editor.fsx b/fcs/docsrc/content/ja/editor.fsx
index f8a33e9a75a..8351a56a44e 100644
--- a/fcs/docsrc/content/ja/editor.fsx
+++ b/fcs/docsrc/content/ja/editor.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラサービス: エディタサービス
====================================
diff --git a/fcs/docsrc/content/ja/filesystem.fsx b/fcs/docsrc/content/ja/filesystem.fsx
index 0680f34122f..52c74f90e76 100644
--- a/fcs/docsrc/content/ja/filesystem.fsx
+++ b/fcs/docsrc/content/ja/filesystem.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラサービス: ファイルシステム仮想化
==========================================
diff --git a/fcs/docsrc/content/ja/interactive.fsx b/fcs/docsrc/content/ja/interactive.fsx
index 59bae44f01b..0a9db5813fe 100644
--- a/fcs/docsrc/content/ja/interactive.fsx
+++ b/fcs/docsrc/content/ja/interactive.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
インタラクティブサービス: F# Interactiveの組み込み
==================================================
diff --git a/fcs/docsrc/content/ja/project.fsx b/fcs/docsrc/content/ja/project.fsx
index 8b70e3df5f7..a5fb7219727 100644
--- a/fcs/docsrc/content/ja/project.fsx
+++ b/fcs/docsrc/content/ja/project.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラサービス: プロジェクトの分析
======================================
diff --git a/fcs/docsrc/content/ja/symbols.fsx b/fcs/docsrc/content/ja/symbols.fsx
index ff62b0de6b2..86fa00cded3 100644
--- a/fcs/docsrc/content/ja/symbols.fsx
+++ b/fcs/docsrc/content/ja/symbols.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラサービス: シンボルの処理
==================================
diff --git a/fcs/docsrc/content/ja/tokenizer.fsx b/fcs/docsrc/content/ja/tokenizer.fsx
index 4daf29b7ead..b519b480e5d 100644
--- a/fcs/docsrc/content/ja/tokenizer.fsx
+++ b/fcs/docsrc/content/ja/tokenizer.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラサービス:F#トークナイザを使用する
============================================
diff --git a/fcs/docsrc/content/ja/untypedtree.fsx b/fcs/docsrc/content/ja/untypedtree.fsx
index 447e3742fff..7ac239c6483 100644
--- a/fcs/docsrc/content/ja/untypedtree.fsx
+++ b/fcs/docsrc/content/ja/untypedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net461"
+#I "../../../../artifacts/bin/fcs/netstandard2.0"
(**
コンパイラサービス:型無し構文木の処理
======================================
diff --git a/fcs/docsrc/content/project.fsx b/fcs/docsrc/content/project.fsx
index a537000435e..193af1b1945 100644
--- a/fcs/docsrc/content/project.fsx
+++ b/fcs/docsrc/content/project.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Project Analysis
==================================
@@ -306,61 +306,6 @@ correctly and then analyze each project in turn.
*)
-(**
-Cracking a legacy project file
------------------------------
-
-F# projects normally use the '.fsproj' project file format.
-A project cracking facility for legacy old-style .fsproj is provided as a separate NuGet package:
-FSharp.Compiler.Service.ProjectCracker.
-
-Project cracking for modern project files should be done using a library such as DotNetProjInfo.
-See FsAutoComplete for example code.
-
-The legacy NuGet package `FSharp.Compiler.Service.ProjectCracker` contains a
-library `FSharp.Compiler.Service.ProjectCracker.dll`, which should be
-referenced by your application directly, and an executable
-`FSharp.Compiler.Service.ProjectCrackerTool.exe`, which should be copied
-into the output folder of your application by the build process. If
-you install using Paket or NuGet, then this will be configured for you
-automatically. If not, you should reference the provided `.targets`
-file manually in your application. This can be found in the NuGet
-package at `build/net461/FSharp.Compiler.Service.ProjectCrackerTool.targets`.
-
-The reason for this split was so the analysis of an F# project
-file is performed out of process, in order that the necessary assembly
-binding redirects can be applied without requiring the caller to
-arrange this. In this way MSBuild versions from 4 up to 14 can be
-accommodated transparently.
-
-In this example we get the project options for one of the
-project files in the F# Compiler Service project itself - you should also be able to use this technique
-for any project that builds cleanly using the command line tools 'xbuild' or 'msbuild'.
-
-
-*)
-
-let projectFile = __SOURCE_DIRECTORY__ + @"/../../src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj"
-
-ProjectCracker.GetProjectOptionsFromProjectFile(projectFile)
-
-
-(**
-
-You can also request RELEASE mode and set other build configuration parameters:
-
-*)
-
-ProjectCracker.GetProjectOptionsFromProjectFile(projectFile, [("Configuration", "Release")])
-
-(**
-
-For debugging purposes it is also possible to obtain a detailed log from the assembly resolution process.
-
-*)
-
-let options, logs = ProjectCracker.GetProjectOptionsFromProjectFileLogged(projectFile, [("Configuration", "Release")])
-
(**
Summary
-------
diff --git a/fcs/docsrc/content/queue.fsx b/fcs/docsrc/content/queue.fsx
index 7cf14a7b709..deb9dd80379 100644
--- a/fcs/docsrc/content/queue.fsx
+++ b/fcs/docsrc/content/queue.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Notes on the FSharpChecker operations queue
=================================================
diff --git a/fcs/docsrc/content/react.fsx b/fcs/docsrc/content/react.fsx
index be108b92adb..fab1f554d75 100644
--- a/fcs/docsrc/content/react.fsx
+++ b/fcs/docsrc/content/react.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Reacting to Changes
============================================
diff --git a/fcs/docsrc/content/symbols.fsx b/fcs/docsrc/content/symbols.fsx
index ab6b4657dcf..501c4d3b351 100644
--- a/fcs/docsrc/content/symbols.fsx
+++ b/fcs/docsrc/content/symbols.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Working with symbols
============================================
diff --git a/fcs/docsrc/content/tokenizer.fsx b/fcs/docsrc/content/tokenizer.fsx
index 93a1dd3bf16..53dc089df5f 100644
--- a/fcs/docsrc/content/tokenizer.fsx
+++ b/fcs/docsrc/content/tokenizer.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Using the F# tokenizer
=========================================
diff --git a/fcs/docsrc/content/typedtree.fsx b/fcs/docsrc/content/typedtree.fsx
index 385822335e9..07b92fe5658 100644
--- a/fcs/docsrc/content/typedtree.fsx
+++ b/fcs/docsrc/content/typedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Processing typed expression tree
=================================================
diff --git a/fcs/docsrc/content/untypedtree.fsx b/fcs/docsrc/content/untypedtree.fsx
index 162fedfa196..62971af931c 100644
--- a/fcs/docsrc/content/untypedtree.fsx
+++ b/fcs/docsrc/content/untypedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net461"
+#I "../../../artifacts/bin/fcs/netstandard2.0"
(**
Compiler Services: Processing untyped syntax tree
=================================================
diff --git a/fcs/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx
index 09fa803a2f5..77ddb84fd51 100644
--- a/fcs/docsrc/tools/generate.fsx
+++ b/fcs/docsrc/tools/generate.fsx
@@ -33,7 +33,7 @@ open FSharp.Literate
let root = "."
// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net461"
+let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/netstandard2.0"
let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../../../docs"
let files = __SOURCE_DIRECTORY__ @@ "../files"
diff --git a/fcs/netfx.props b/fcs/netfx.props
deleted file mode 100644
index 064f29b1809..00000000000
--- a/fcs/netfx.props
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
- true
-
-
- /Library/Frameworks/Mono.framework/Versions/Current/lib/mono
- /usr/lib/mono
- /usr/local/lib/mono
-
-
- $(BaseFrameworkPathOverrideForMono)/4.5-api
- $(BaseFrameworkPathOverrideForMono)/4.5.1-api
- $(BaseFrameworkPathOverrideForMono)/4.5.2-api
- $(BaseFrameworkPathOverrideForMono)/4.6-api
- $(BaseFrameworkPathOverrideForMono)/4.6.1-api
- $(BaseFrameworkPathOverrideForMono)/4.6.2-api
- $(BaseFrameworkPathOverrideForMono)/4.7-api
- $(BaseFrameworkPathOverrideForMono)/4.7.1-api
- true
-
-
- $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)
-
-
\ No newline at end of file
diff --git a/fcs/samples/EditorService/EditorService.fsproj b/fcs/samples/EditorService/EditorService.fsproj
index d71d6dc2913..d7c99bed010 100644
--- a/fcs/samples/EditorService/EditorService.fsproj
+++ b/fcs/samples/EditorService/EditorService.fsproj
@@ -1,7 +1,6 @@
-
- $(FcsTargetNetFxFramework);netcoreapp2.0
+ netcoreapp2.0
true
Exe
false
@@ -15,8 +14,4 @@
-
-
-
-
diff --git a/fcs/samples/FscExe/App.config b/fcs/samples/FscExe/App.config
deleted file mode 100644
index ab704c8783e..00000000000
--- a/fcs/samples/FscExe/App.config
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/fcs/samples/FscExe/FscExe.fsproj b/fcs/samples/FscExe/FscExe.fsproj
deleted file mode 100644
index 97553e41249..00000000000
--- a/fcs/samples/FscExe/FscExe.fsproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- $(FcsTargetNetFxFramework)
- true
- Exe
- false
- $(DefineConstants);RESIDENT_COMPILER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fcs/samples/FscExe/FscMain.fs b/fcs/samples/FscExe/FscMain.fs
deleted file mode 100644
index da272800d65..00000000000
--- a/fcs/samples/FscExe/FscMain.fs
+++ /dev/null
@@ -1,307 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-
-module internal FSharp.Compiler.CommandLineMain
-
-open System
-open System.Diagnostics
-open System.IO
-open System.Reflection
-open System.Runtime.CompilerServices
-open FSharp.Compiler.SourceCodeServices
-open FSharp.Compiler.AbstractIL.IL // runningOnMono
-open FSharp.Compiler.AbstractIL.Internal.Library
-open FSharp.Compiler.ErrorLogger
-
-#if RESIDENT_COMPILER
-type TypeInThisAssembly() = member x.Dummy = 1
-
-let progress = ref false
-
-/// Implement the optional resident compilation service
-module FSharpResidentCompiler =
-
- open System.Runtime.Remoting.Channels
- open System.Runtime.Remoting
- open System.Runtime.Remoting.Lifetime
- open System.Text
-
- /// Collect the output from the stdout and stderr streams, character by character,
- /// recording the console color used along the way.
- type private OutputCollector() =
- let output = ResizeArray()
- let outWriter isOut =
- { new TextWriter() with
- member x.Write(c:char) = lock output (fun () -> output.Add (isOut, (try Some Console.ForegroundColor with _ -> None) ,c))
- member x.Encoding = Encoding.UTF8 }
- do Console.SetOut (outWriter true)
- do Console.SetError (outWriter false)
- member x.GetTextAndClear() = lock output (fun () -> let res = output.ToArray() in output.Clear(); res)
-
- /// The compilation server, which runs in the server process. Accessed by clients using .NET remoting.
- type FSharpCompilationServer() =
- inherit MarshalByRefObject()
-
- static let onWindows =
- match System.Environment.OSVersion.Platform with
- | PlatformID.Win32NT | PlatformID.Win32S | PlatformID.Win32Windows | PlatformID.WinCE -> true
- | _ -> false
-
- // The channel/socket name is qualified by the user name (and domain on windows)
- static let domainName = if onWindows then Environment.GetEnvironmentVariable "USERDOMAIN" else ""
- static let userName = Environment.GetEnvironmentVariable (if onWindows then "USERNAME" else "USER")
- // Use different base channel names on mono and CLR as a CLR remoting process can't talk
- // to a mono server
- static let baseChannelName =
- if runningOnMono then
- "FSCChannelMono"
- else
- "FSCChannel"
- static let channelName = baseChannelName + "_" + domainName + "_" + userName
- static let serverName =
- if runningOnMono then
- "FSCServerMono"
- else
- "FSCSever"
- static let mutable serverExists = true
-
- let outputCollector = new OutputCollector()
-
- // This background agent ensures all compilation requests sent to the server are serialized
- let agent = MailboxProcessor<_>.Start(fun inbox ->
- async {
- while true do
- let! (pwd,argv, reply: AsyncReplyChannel<_>) = inbox.Receive()
- if !progress then printfn "server agent: got compilation request, argv = %A" argv
- Environment.CurrentDirectory <- pwd
- let errors, exitCode = FSharpChecker.Create().Compile (argv) |> Async.RunSynchronously
- for error in errors do eprintfn "%s" (error.ToString())
- if !progress then printfn "server: finished compilation request, argv = %A" argv
- let output = outputCollector.GetTextAndClear()
- reply.Reply(output, exitCode)
- GC.Collect(3)
- // Exit the server if there are no outstanding requests and the
- // current memory usage after collection is over 200MB
- if inbox.CurrentQueueLength = 0 && GC.GetTotalMemory(true) > 200L * 1024L * 1024L then
- exit 0
- })
-
- member x.Run() =
- while serverExists do
- if !progress then printfn "server: startup thread sleeping..."
- System.Threading.Thread.Sleep 1000
-
- abstract Ping : unit -> string
- abstract Compile : string * string[] -> (bool * System.ConsoleColor option * char) [] * int
- default x.Ping() = "ping"
- default x.Compile (pwd,argv) =
- if !progress then printfn "server: got compilation request, (pwd, argv) = %A" (pwd, argv)
- let res = agent.PostAndReply(fun reply -> (pwd,argv,reply))
- if !progress then printfn "server: got response, response = %A" res
- res
-
- override x.Finalize() =
- serverExists <- false
-
- // This is called on the server object by .NET remoting to initialize the lifetime characteristics
- // of the server object.
- override x.InitializeLifetimeService() =
- let lease = (base.InitializeLifetimeService() :?> ILease)
- if (lease.CurrentState = LeaseState.Initial) then
- lease.InitialLeaseTime <- TimeSpan.FromDays(1.0);
- lease.SponsorshipTimeout <- TimeSpan.FromMinutes(2.0);
- lease.RenewOnCallTime <- TimeSpan.FromDays(1.0);
- box lease
-
- static member RunServer() =
- if !progress then printfn "server: initializing server object"
- let server = new FSharpCompilationServer()
- let chan = new Ipc.IpcChannel(channelName)
- ChannelServices.RegisterChannel(chan,false);
- RemotingServices.Marshal(server,serverName) |> ignore
-
- // On Unix, the file permissions of the implicit socket need to be set correctly to make this
- // private to the user.
- if runningOnMono then
- try
- let monoPosix = System.Reflection.Assembly.Load(new System.Reflection.AssemblyName("Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"))
- let monoUnixFileInfo = monoPosix.GetType("Mono.Unix.UnixFileSystemInfo")
- let socketName = Path.Combine(FileSystem.GetTempPathShim(), channelName)
- let fileEntry = monoUnixFileInfo.InvokeMember("GetFileSystemEntry", (BindingFlags.InvokeMethod ||| BindingFlags.Static ||| BindingFlags.Public), null, null, [| box socketName |],System.Globalization.CultureInfo.InvariantCulture)
- // Add 0x00000180 (UserReadWriteExecute) to the access permissions on Unix
- monoUnixFileInfo.InvokeMember("set_FileAccessPermissions", (BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| BindingFlags.Public), null, fileEntry, [| box 0x00000180 |],System.Globalization.CultureInfo.InvariantCulture) |> ignore
-#if DEBUG
- if !progress then printfn "server: good, set permissions on socket name '%s'" socketName
- let fileEntry = monoUnixFileInfo.InvokeMember("GetFileSystemEntry", (BindingFlags.InvokeMethod ||| BindingFlags.Static ||| BindingFlags.Public), null, null, [| box socketName |],System.Globalization.CultureInfo.InvariantCulture)
- let currPermissions = monoUnixFileInfo.InvokeMember("get_FileAccessPermissions", (BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| BindingFlags.Public), null, fileEntry, [| |],System.Globalization.CultureInfo.InvariantCulture) |> unbox
- if !progress then printfn "server: currPermissions = '%o' (octal)" currPermissions
-#endif
- with e ->
-#if DEBUG
- printfn "server: failed to set permissions on socket, perhaps on windows? Is is not needed there."
-#endif
- ()
- // Fail silently
- server.Run()
-
- static member private ConnectToServer() =
- Activator.GetObject(typeof,"ipc://" + channelName + "/" + serverName)
- :?> FSharpCompilationServer
-
- static member TryCompileUsingServer(fscServerExe,argv) =
- // Enable these lines to write a log file, e.g. when running under xbuild
- //let os = System.IO.File.CreateText "/tmp/fsc-client-log"
- //let printfn fmt = Printf.kfprintf (fun () -> fprintfn os ""; os.Flush()) os fmt
- let pwd = System.Environment.CurrentDirectory
- let clientOpt =
- if !progress then printfn "client: creating client"
- // Detect the absence of the channel via the exception. Probably not the best way.
- // Different exceptions get thrown here on Mono and Windows.
- let client = FSharpCompilationServer.ConnectToServer()
- try
- if !progress then printfn "client: attempting to connect to existing service (1)"
- client.Ping() |> ignore
- if !progress then printfn "client: connected to existing service"
- Some client
- with _ ->
- if !progress then printfn "client: error while creating client, starting client instead"
- let procInfo =
- if runningOnMono then
- let shellName, useShellExecute =
- match System.Environment.GetEnvironmentVariable("FSC_MONO") with
- | null ->
- if onWindows then
- // e.g. "C:\Program Files\Mono-2.6.1\lib\mono\2.0\mscorlib.dll" --> "C:\Program Files\Mono-2.6.1\bin\mono.exe"
- Path.Combine(Path.GetDirectoryName (typeof