Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net5.0 #10992

Merged
merged 1 commit into from
Feb 2, 2021
Merged

net5.0 #10992

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/fsharp/FxResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ type internal FxResolver(assumeDotNetFramework: bool option, projectDir: string,
let startPos =
let startPos = file.IndexOf(pattern, StringComparison.OrdinalIgnoreCase)
if startPos >= 0 then startPos + (pattern.Length) else startPos

let length =
if startPos >= 0 then
let ep = file.IndexOf("\"", startPos)
Expand All @@ -305,16 +304,21 @@ type internal FxResolver(assumeDotNetFramework: bool option, projectDir: string,
| -1, _
| _, -1 ->
if isRunningOnCoreClr then
// Running on coreclr but no deps.json was deployed with the host so default to 3.1
Some "netcoreapp3.1"
// Running on coreclr but no deps.json was deployed with the host so default to 5.0
Some "net5.0"
else
// Running on desktop
None
| pos, length ->
// use value from the deps.json file
Some ("netcoreapp" + file.Substring(pos, length))

// Tries to figure out the tfm for the compiler instance on the Windows desktop.
let suffix = file.Substring(pos, length)
let prefix =
match Double.TryParse(suffix) with
| true, value when value < 5.0 -> "netcoreapp"
| _ -> "net"
Some (prefix + suffix)

// Tries to figure out the tfm for the compiler instance on the Windows desktop
// On full clr it uses the mscorlib version number
let getRunningDotNetFrameworkTfm () =
let defaultMscorlibVersion = 4,8,3815,0
Expand Down