update f# version
Answered
in f# core rider gives me the squiglies to string interpolation it even though the project version is set to one that does not support it (4.7)
fsi & fsc tell me that 4.7 is installed
rider allows me to select f# core project version which includes 5.0 or 6.0
selecting 5.0 build generates errors due to incorrect build version 4.7 - [FS1160] This token is reserved for future use
selecting 6.0 build generates unknown langversion version error
I assume i need to update the installed f# version
rider docs say to look at this page https://fsharp.org/use/linux/ for f# installation instructions which in turns tells me to install rider.
can I install the latest f# using the following without messing up rider ?
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel Current
Please sign in to leave a comment.
Hi Simpson!
Thank you for contacting us.
The easiest way is to install .NET 6 or .NET 5 or .NET Core 3.x from Microsoft.
How exactly the language version is set in the project? Could you please share screenshots or settings when you set it? I will also appreciate any other screenshots/details you can share for a better understanding of the case.
Thank you in advance!
Hi Alexandra, thanks for the reply
further to my original post, attempting to install the latest as above tells me that it is already installed.
$ curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel Current
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: .NET Core SDK version 6.0.101 is already installed.
dotnet-install: Adding to current process PATH: `/home/gerry/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
$ dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.22 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.22 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
$ dotnet --list-sdks
3.1.416 [/usr/share/dotnet/sdk]
when setting to F# 6 and building
When setting to F#5 and building using string interpolation
Original code with suggested action (all f# versions - even where not supported ) - successfully builds under F# 5
Additionally - it appears that F# 4.7 ins installed instead of 6 ??
Same result within rider f# interactive session
$ dotnet fsi
Microsoft (R) F# Interactive version 10.10.0.0 for F# 4.7
Copyright (c) Microsoft Corporation. All Rights Reserved.
For help type #help;;
>
I noticed this line from the sdk install
dotnet-install: Adding to current process PATH: `/home/gerry/.dotnet`. Note: This change will be visible only when sourcing script.
so it seems that the dotnet 6 installer does a user local install
if I run ~/.dotnet/dotnet fsi I get the proper version
how do we globally update to dotnet 6 ?
installed dotnet 6 via apt - so far that has resolved issues.