Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit f8522d3

Browse files
KevinRansomnosami
authored andcommitted
net5.0 (dotnet#10992)
1 parent c93c9c1 commit f8522d3

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/fsharp/FxResolver.fs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ type internal FxResolver(assumeDotNetFramework: bool option, projectDir: string,
295295
let startPos =
296296
let startPos = file.IndexOf(pattern, StringComparison.OrdinalIgnoreCase)
297297
if startPos >= 0 then startPos + (pattern.Length) else startPos
298-
299298
let length =
300299
if startPos >= 0 then
301300
let ep = file.IndexOf("\"", startPos)
@@ -305,16 +304,21 @@ type internal FxResolver(assumeDotNetFramework: bool option, projectDir: string,
305304
| -1, _
306305
| _, -1 ->
307306
if isRunningOnCoreClr then
308-
// Running on coreclr but no deps.json was deployed with the host so default to 3.1
309-
Some "netcoreapp3.1"
307+
// Running on coreclr but no deps.json was deployed with the host so default to 5.0
308+
Some "net5.0"
310309
else
311310
// Running on desktop
312311
None
313312
| pos, length ->
314313
// use value from the deps.json file
315-
Some ("netcoreapp" + file.Substring(pos, length))
316-
317-
// Tries to figure out the tfm for the compiler instance on the Windows desktop.
314+
let suffix = file.Substring(pos, length)
315+
let prefix =
316+
match Double.TryParse(suffix) with
317+
| true, value when value < 5.0 -> "netcoreapp"
318+
| _ -> "net"
319+
Some (prefix + suffix)
320+
321+
// Tries to figure out the tfm for the compiler instance on the Windows desktop
318322
// On full clr it uses the mscorlib version number
319323
let getRunningDotNetFrameworkTfm () =
320324
let defaultMscorlibVersion = 4,8,3815,0

0 commit comments

Comments
 (0)