Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Target F# Runtime" grayed out - why?

I'm trying to change the project target runtime from F# 3.1 to F# 4.0 in VS2015 RTM, but the target runtime dropdown is grayed out: enter image description here

Any reason for this? How can I fix it?

like image 325
John Reynolds Avatar asked Jul 25 '15 22:07

John Reynolds


1 Answers

Check your fsproj file, it needs to specify the FSharp.Core reference templatized by $(TargetFSharpCoreVersion), e.g. <Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />.

Some nuget packages whack the templatized FSharp.Core reference and replace it with a hard-coded package-specific version. That prevents the project system from letting you toggle the version easily.

Fix is to simply paste back in the templatized version.

like image 128
latkin Avatar answered Sep 17 '22 17:09

latkin