f# - F# 加载程序集时出现问题:“无法加载一种或多种请求的类型”
问题描述
我是 F# 和 Visual Studio 的新手,我正试图找出问题所在。我正在尝试使用 SqlDataProvider。我的代码:
module HelloSquare
open System
open FSharp.Data.Sql
let square x = x * x
type PortalProd = SqlDataProvider<
Common.DatabaseProviderTypes.MYSQL,
"Server=localhost;Database=test;User=test;Password=test;",
UseOptionTypes=true>
[<EntryPoint>]
let main argv =
let test = 12312
printfn "%d squared is: %d!" 12 (square 12)
0 // Return an integer exit code
我得到的错误是:
Error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Unable to load one or more of the requested types.Could not load file or assembly 'Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=APublicKey'.
我使用 nuget 添加了 protobuf,但错误仍然存在。
希望这很简单,但我可以使用一些帮助。
macOS High Sierra 10.13.6 Visual Studio Community 2019 for Mac 版本 8.0.1(内部版本 1)
解决方案
推荐阅读
- mysql - 这个sql函数的正确版本是什么?
- joomla3.0 - 使用批处理时生成多个重复内容
- swift - 将接受闭包的函数转换为接受函数
- ios - react-native run-ios 失败 - 找不到模拟器
- html - 将普通复选框更改为自定义复选框,并使它们表现为单选按钮
- android - 使用 Android Studio/Kotlin 从 URL 到 textView 的文本崩溃应用程序
- c++ - string += s1 和 string = string + s1 之间的区别
- php - 我如何在 php 上正确使用 else 和 if ?
- javascript - 输入范围设定值不更新拇指显示
- python - Pandas/Numpy Groupby + 聚合(包括整数平均值)+ 过滤器