Why can't I get Suave to work on VS 2017?

I saw a video at https://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-F-Tools , where a project is created using Suave. I tried to keep track of exactly what was done, but my VS 2017 installation, just updated today, behaves in a completely different way.

First I installed Suave exactly the same as in the video, and it appears among my links between mscorliband System, as in the video.

Then the following code is shown in the video:

[<EntryPoint>]
let main argv = 
    startWebServer
    0 // return an integer exit code

At this point, VS 2017 offers "Open Suave" in the video, since startWebServer is not recognized. I copied the same code in my editor, in a file Program.fs. The error message "The value or constructor" startWebServer "is not defined" appears, but there are no suggestions when the cursor hovers over the left yellow area. (Perhaps this is because I'm using Community Edition?)

In any case, I added open Suaveto the code so that I had:

open Suave

[<EntryPoint>]
let main argv = 
    startWebServer
    0 // return an integer exit code

At this point, I get a red curve under Suave and the error message "Namespace or Suave module is undefined."

If I right-click Suave in Solution Explorer, and then select “Send to Interactive,” then I can open Suavein F # Interactive.

, Deedle, .

, ?

+4
1

, , :

enter image description here

, . , fsprojects FSharp.Core, . FSharp.Core 4.1 .

, .

  • .NET 4.6.2 ( )
  • F # 4.1

. nuget FSharp.Core . .

  1. FSharp.Core
  2. Nuget FSharp.Core 4.1

:

enter image description here

Paket VS2017. "" VS. , Suave FSharp.core paket.references dependencies, redirects: on, Paket . fsx, , paket . paket.dependencies paket.references GitHub:

paket.dependencies :

framework: = net462
source https://www.nuget.org/api/v2
redirects: on

nuget Suave

paket.references :

Suave
FSharp.Core
+5

Source: https://habr.com/ru/post/1675002/


All Articles