我正在尝试在F#中构建Web Api。我使用的是.NET 4.5.2,F#4.0(FSharp.Core 4.4.0.0)。我使用了F#模板扩展,因此该项目是作为WebApi项目创建的。
当我启动时,我收到此错误:
Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly
'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
or one of its dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 23:
Line 24: member __.Configuration(builder: IAppBuilder) =
Line 25: let config = new HttpConfiguration()
Line 26: Startup.RegisterWebApi(config)
Line 27: builder.UseWebApi(config) |> ignore
我在版本10.0.2上有Newtonsoft.Json。
我尝试了以下内容:
我的解决方案有3个项目,但只有API使用此nuget包。
我知道这个问题有一百个版本,但是它们似乎都没有处理与F#Api相关的错误,而且我想我已经尝试了其他地方列出的所有简单的事情。