How to create F# Console Application targeting .Net Framework 4.5.2. in Visual Studio 2019

205 views Asked by At

Q: How to create F# Console Application targeting .NET Framework 4.5.2. in Visual Studio 2019? Is that even possible?

Selected F# + Windows + Console:

enter image description here

Selected .NET Framework 4.5.2.:

enter image description here

When then project gets created it has no target framework:

enter image description here

and in Solution Explorer it looks like this:

enter image description here

and the following message is displayed :

enter image description here

Q: Which .NET SDK do I need to be able to create F# Console Application targeting .NET Framework 4.5.2.?


Based on comment from Bent Tranberg I created Console Application which used target Framework 4.7.2 and edited the project file:

<TargetFramework>net472</TargetFramework> was changed to <TargetFramework>net452</TargetFramework>

And then the NuGet package FSharp.Core was downgraded from version 5.0.0 to version 4.5.2.

On my machine where Visual Studio 2019 is installed I see this version of .NET SDK:

enter image description here

I used FSharp.Core.4.5.2 which seems to work so far.

But here the minimum F# language version and the minimum FSharp.Core package version can be found.

Q: My F# Interactive shows F# 5.0 so I should use FSharp.Core.5.0.0 but that doesn't seem to work with .NET Framework 4.5.2 so what to do?

0

There are 0 answers