Hi all,
It has been a while since I have spent a lot of time with Microsoft development tools including keeping up with the latest vsproject file formats. I am a decent emacs user and was hoping to try F# out on OSX like I have with Clojure. In doing so, I have hit a few problems. I am using F# interactive 3.1. The relevant parts of my emacs (version 24.2) init.el file looks like
(unless (package-installed-p 'fsharp-mode)
(package-install 'fsharp-mode))
(require 'fsharp-mode)
FSharp mode seems to kind of work so I think I have emacs configured correctly. The problem is that I have added a dependency on Suave to my project and can't get fsi to recognize that this dependency exists. My code looks like the below for Library.fs.
namespace valet
/// Documentation for my library
///
/// ## Example
///
/// let h = Library.hello 1
/// printfn "%d" h
///
module Library =
open Suave
open Suave.Http.Successful
open Suave.Web
let hello num = 42
When doing a C-c C-f I get a
error FS0039: The namespace or module 'Suave' is not defined
However, when I build the project from the command line it all builds fine using. If I do a C-c C-p to load the project I get a
The required attribute in "Project" in Import is empty.
I was hoping that when sending my code to fsi in emacs that the references from the project file would be read and all would be good. But maybe I am expecting something that is not possible. I am trying to figure out why things are not working properly. Should I be adding a #r? I thought #r was more for fsharp scripts (fsx files). Is the way I am trying to work with a fsproj not possible with F# interactive mode?
I appreciate any and all help.
Thanks,
Ryan