SuaveIO / suave

Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
https://suave.io
Other
1.32k stars 198 forks source link

new project crashes when run #697

Closed goekboet closed 6 years ago

goekboet commented 6 years ago

I'm trying to run a basic suave application with dotnet core but I get an exception.

mkdir repro && cd repro dotnet new console -lang f# dotnet add package suave

Edit Program.fs:

open System
open Suave

[<EntryPoint>]
let main argv =
    startWebServer defaultConfig (Successful.OK "hello") 
    0 

donet run

Program crashes. Output:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'FSharp.Core, Version=4.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Output from dotnet --info

.NET Command Line Tools (2.1.4)

Product Information: Version: 2.1.4 Commit SHA-1 hash: 5e8add2190

Runtime Environment: OS Name: Mac OS X OS Version: 10.13 OS Platform: Darwin RID: osx.10.12-x64 Base Path: /usr/local/share/dotnet/sdk/2.1.4/

Microsoft .NET Core Shared Framework Host

Version : 2.0.5 Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54

haf commented 6 years ago

Could you try https://github.com/SuaveIO/Suave.Template#using-the-template ? Your error is due to how F# is versioned, not how this package is versioned (except being backwards-compat and thereby conflicting)

goekboet commented 6 years ago

ok. It works with the Suave.Template. Thanks!