I have installed F# using Visual Studio Community Edition and I also installed the Visual F# 4.0 Tools
When I run fsi from a command prompt an exception is thrown
I also tried adding the F# to the path, but that did not solve the problem. What else should I do?
Edit:
If I run fsi directly from C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0 it works.
I had my problem fixed with using the F# forum on google.
But for the reference, here's the solution.
After running where fsi I had this output:
λ where fsi
C:\Program Files\dotnet\bin\fsi.exe
C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Fsi.exe
For some reason fsi from dotnet core is not working. I changed the order in my system path so that the F# Tools came before dotnet core and that fixed the problem.
Uninstall the Visual F# 4.0 tools, then start Visual Studio and check if the F# interactive window works there. This could be something specific to your machine or a mismatch between VS2015 and the F# Tools. Specifically VS2015 Update 1 had some wrong redirects. And the F# there is higher than F# 4.0 Tools. Can you confirm your VS2015 version?
Btw, fsi.exe should be in C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0
and the version is Microsoft (R) F# Interactive version 14.0.23413.0
I just installed atom and did "apm install ionide-installer". I already have Visual Studio and f# installed. No problem edit .fsx file, "Syntax highlighting" and "Error highlighting". But how can I invoke f# REPL? Thank you.
With Atom Editor focused hit Ctrl+Shift+P. That opens the Atom command window. Type fsi to show all the FSharp Interactive commands. You should see this:
I am currently learning F# and working through the samples on tryfsharp.org. I am using the Mono F# on a Mac.The script begins as follows:
#r "MathNet.Numerics.dll"
open MathNet.Numerics
open System.Numerics
When starting the script I get the following error message:
/Users/benjamin/Desktop/Kalman/kalman.fsx(1,1): error FS0078: Unable to find the file '
MathNet.Numerics.dll' in any of
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/mono/4.5
/Users/benjamin/Desktop/Kalman
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/m
I do not know, where to find that DLL or how to install it.
You should just be able to use nuget to get that library.
http://nuget.org/packages/MathNet.Numerics
See here to install nuget:
http://docs.nuget.org/docs/start-here/nuget-faq
Decided to try out F# for the first time on my Mac (OSX 10.8, XCode 4.4). I downloaded Mono 3.0.3 and attempted to compile a simple "Hello World" program. It didn't go well:
$ cat Hello.fs
printfn "Hello, World!"
$ /Library/Frameworks/Mono.framework/Versions/3.0.3/bin/fsharpc Hello.fs
F# Compiler for F# 3.0 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
$ ./Hello.exe
zsh: exec format error: ./Hello.exe
$ file Hello.exe
Hello.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly
I looked through the output of fsharpc --help to see if there was an obvious flag for producing the correct type of binary, but nothing seemed particularly helpful. I'm assuming that there's something really obvious I need to do to enable this, but I can't seem to figure it out.
I just realized that I was supposed to do mono Hello.exe. I'll leave this around in case somebody else doesn't read the Mono documentation before trying to compile some code ;)
I was hoping to upgrade to F# 3.0 but I can't find either a packaged F# 3.0 compiler on Microsoft site, nor if there is an express version to use. Is it possible to install F# 3.0 for use from the command line or a simple IDE and if so, how?
The standalone version of F# is not available yet, but F# tools for Visual Studio Express have been released just 2 days ago, so you can get F# 3.0 for free.
Announcing F# Tools for Visual Studio Express 2012 for Web!
As far as I know, there are definitely plans for open-source release (that can be integrated with MonoDevelop) and it would make sense to have a stand-alone installer too (otherwise you could still just compile the open-source release), but I don't think there are specific dates for that.
The easiest way I've got it to run:
http://www.heartysoft.com/build-fsharp-3-on-build-server-without-vs
Essentially using the direct download link on the Web PI tools.
I have successfully make a standalone F# 3.0 works without Visual Studio 2012.
First, find a workstation with F# 3.0 installed. (source)
Duplicate all the things to destination workstation.
-> C:\Program Files (x86)\Microsoft SDKs\F#
-> C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp
-> C:\Windows\Microsoft.NET\assembly\GAC_MSIL\FSharp*
Install .NET 4.5 at destination.
Export all the registry item with FSC.exe string to destination.
Export all the registry item with FSharp string to destination.
f# 3.0 registry.rar
if you don't know how to export the registry items, please download this file and use powershell to import all this .reg file.
PowerShell script: (put the .reg files into c:\xxx suppossedly )
cd c:\xxx
dir *.reg | %{ ('reg import "' + $_.Name + '"') | cmd }
I'm assuming most of you seeking an answer to this question by now probably wouldn't mind the most recent version, which is 4.0. You can download this as a standalone at F# 4.0 . This does not include the supporting assemblies and will fail by itself. So you'll also have to download and install the Microsoft Build Tools 2015 . Should be all set to go from there, no installing the mega-massive visual studio. Of course if you need an IDE you'll need to seek out a free one.
You can use Nuget CLI to install the F# Compiler Tools without relying on Visual Studio. As a plus, this procedure does not require admin rights.
Visit nuget.org/downloads and download the latest nuget.exe file.
Instruct your browser to save the file to a folder of your choice.
Add the folder where you placed nuget.exe to your PATH environment variable to use the CLI tool from anywhere.
Open a command prompt and navigate to the folder where you want to install F# Tools.
Run "nuget install FSharp.Compiler.Tools -Version {version}", where {version} is replaced with a version from https://www.nuget.org/packages/FSharp.Compiler.Tools
Add the 'tools' directory to your PATH Environment Variable and then you will be able to use fsc and fsi from the command line.
There is not currently a standalone version of F# 3.0. However, one has been promised
I run F# 3.0 from the cygwin command line on Windows 7. You need to know a little about Linux/Unix to use cygwin, but the basics are not too difficult. You need the basic cygwin shell (command interpreter) and an editor. I am used to vi, so cygwin has vim (there exists a nice F# syntax color addon to vim).
You need to:
Install visual studio in order to get F#
in /users/myname/.bashrc add the location of Fsc.exe, which in my case is
/cygdrive/c/Program Files (x86)/Microsoft SDKs/F#/3.0/Framework/v4.0
to your PATH.