This was fixed by opening a command prompt, changing to the ide directory where devenv.exe is located and running the command "devenv /installvstemplates"
(make sure VS is shutdown first).
type StockAnalyzer (lprices, days) =
let prices =
lprices
|> Seq.map snd
|> Seq.take days
static member GetAnalyzers (tickers,days) =
tickers
|> Seq.map loadPrices
|> Seq.map (fun prices -> new StockAnalyzer (prices, days))
member s.Return =
let lastPrice = prices |> Seq.nth 0
let startPrice = prices |> Seq.nth (days - 1)
lastPrice / startPrice -1.
SOLUTION:
Try putting a space between the "-" and "1". The F# compiler is interpretting -1 as literally a negative value of 1 instead of subtract 1.
Thanks Jaredpar!
The original stackoverflow post is here.