f# - F# 类型提供程序 FSharp,Data.SqlClient 目标 .NetStandard 2.0 在使用命令行中的 dotNet 构建时失败,但在 Visual Studion 2019 中成功
问题描述
我在针对 .Net-Standard-2.0 的 DLL 中使用 F# 类型提供程序 FSharp.Data.SqlClient,虽然这在 Visual Studio 2019 中成功构建,但当我尝试使用命令提示符编译器 dotNet 编译器构建它时失败,并出现以下错误信息
J:\Workspaces\DRILQUIP_2456764.0\Applications\EngWeb\Dev\src\EngWeb.Core\BillOfDocuments\BillOfDocumentsDataAccess.fs(14,27): error FS3033: The type provider 'FSharp.Data.SqlProgrammabilityProvider' reported an error: Could not load file or assembly 'System.Data.SqlClient, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058) [J:\Workspaces\DRILQUIP_2456764.0\Applications\EngWeb\Dev\src\EngWeb.Core\EngWeb.Core.fsproj]
J:\Workspaces\DRILQUIP_2456764.0\Applications\EngWeb\Dev\src\EngWeb.Core\BillOfDocuments\BillOfDocumentsDataAccess.fs(14,27): error FS3033: The type provider 'FSharp.Data.SqlProgrammabilityProvider' reported an error: Could not load file or assembly 'System.Data.SqlClient, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)
我正在使用 FSharp.Data.SqlClient 版本 2.0.6 和 System.Data.SqlClient 版本 4.8.1 和 FSharp.Core 版本 4.7.0
对此问题的任何帮助将不胜感激
解决方案
推荐阅读
- performance - 避免递归 Vue.js 组件和数据中不必要的观察者的策略
- java - Apache POI:如何根据 Java DateTimeFormatter 设置单元格的 dataFormat
- django - Django ORM:需要每个值的最大 ID 值列表
- java - 运行我的应用程序后,XML 文件不包含任何数据
- javascript - 如何将 AJAX 中的数据返回到 keyup 事件中
- python - 如何设置 ipython 配置文件特定的扩展?
- python - Openpyxl 工作表对象没有属性 move_range
- linux - Linux ld-linux.so 的版本化符号
- javascript - Apple Pay:如何在显示订单信息之前获取`shippingAddress`?
- python - 在 mac 与 pc 上保存和恢复 .csv 文件