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

瘦欲@ 提交于 2019-12-01 19:49:57

Of course, you can but it might be just a little work:

You should be able to clone my repo if necessary. You will note that my fsprojects file does not reference an explicit version of FSharp.Core so there is no confusion between the Target and actual version. It's actually FSharp.Core 4.1 btw.

If you're working from your original solution I would make a new one first.

  1. Set the project to .NET 4.6.2 (or whatever you fancy)
  2. Target F# 4.1
  3. Nuget Suave

Add this point nuget will download FSharp.Core and replace it in your project. That's not very nice.

  1. Delete FSharp.Core from your references
  2. From Nuget add FSharp.Core 4.1

You're good to go:

I also suggest you install Paket for VS2017. You can then access it from the Tools menu in VS. That way you can just add Suave and FSharp.core to your paket.references and dependencies file, set redirects: on, run Paket install from the menu and forget about all this version mismatch business. If you're using a lot of fsx files, this is extra nice because paket will strip out the version numbers from the path. Please look at the paket.dependencies and paket.references file in the solution on GitHub:

paket.dependencies in solution root:

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

nuget Suave

paket.references in project folder:

Suave
FSharp.Core
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!