- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是在 Server 2016
与 net471
这应该表现得像 windows 10
.
所以我通过nuget LibGit2Sharp prerelease
下载在我的 paket.dependencies
, 解析为
LibGit2Sharp (0.26.0-preview-0027)
LibGit2Sharp.NativeBinaries (1.0.226) - restriction: >= netstandard2.0
ionide
)中,我可以引用
LibGit2Sharp.dll
并打开
LibGit2Sharp
命名空间,但实例化存储库会引发以下错误:
Microsoft (R) F# Interactive version 10.1.0 for F# 4.1
> #r "../../packages/play/LibGit2Sharp/lib/netstandard2.0/LibGit2Sharp.dll";;
--> Referenced 'd:\scripts2dev\libwba\src\play\../../packages/play/LibGit2Sharp/lib/netstandard2.0/LibGit2Sharp.dll' (file may be locked by F# Interactive process)
> open LibGit2Sharp;;
> let repo = new Repository("path\to\repo.git");;
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'git2-b0d9952': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
at LibGit2Sharp.Core.NativeMethods..cctor()
--- End of inner exception stack trace ---
at LibGit2Sharp.Core.NativeMethods.git_repository_open(git_repository*& repository, FilePath path)
at LibGit2Sharp.Core.Proxy.git_repository_open(String path)
at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter)
at <StartupCode$FSI_0003>.$FSI_0003.main@() in d:\scripts2dev\libwba\src\play\LibGit2Sharp.fsx:line 4
Stopped due to error
dll
来自
LibGit2Sharp.NativeBinaries
,因为它抛出
> #r @"../..\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll";;
LibGit2Sharp.fsx(7,1): error FS0229: Error opening binary file 'd:\scripts2dev\libwba\src\play\../..\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll': d:\scripts2dev\libwba\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll: bad cli header, rva 0
LibGit2Sharp.fsx(7,1): error FS3160: Problem reading assembly 'd:\scripts2dev\libwba\src\play\../..\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll': Processing of a script fragment has stopped because an exception has been raised
最佳答案
如果您通过 kernel32 的 LoadLibrary 加载 native dll,它应该可以工作。这有帮助吗?
另见 https://christoph.ruegg.name/blog/loading-native-dlls-in-fsharp-interactive.html
[<DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)>]
extern IntPtr LoadLibrary(string lpFileName);
关于f# - 如何从 fsharp 使用 libgit2sharp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51022648/
我已尽力在 Google 中找到答案。但我认为这与我的情况不符。 请给我一个指南。非常感谢。 如果您是我,您可以卸载 + 安装 Visual Emprise。 这个原因让我想了很多次。 感谢所有在我遇
给定一个具有 FSharp 样式函数的接口(interface)。 type IUseless = abstract member Listify: string -> int -> stri
我正在尝试将 F# 用于 ASP.NET MVC 应用程序。我的 Controller 操作将 F# 列表发送到 View ,因此我写道: >" %> 当然,要使其正常工作,我必须将 Microsof
这两个文件似乎与 FSharp.Core.dll 一起位于 F# 的目录中。 如果忘记将它们与 FSharp.Core.dll 放在一起,这两个文件似乎一直是麻烦的根源。 它们似乎是二进制文件,所以我
我很困惑。 我正在升级一个旧项目,它到处都引用了 FSharp.Core 4.4,但 nuget 上 fsharp.core 的最新版本是 4.1.*.* 是否有文件解释版本号倒退的情况? 最佳答案
我在发布 Visual Studio C# Web 服务时遇到问题。构建良好,运行良好,但在发布时出现这个奇怪的错误: Copying file any\netstandard1.6\FSharp.C
此问题基于本类(class)第一周的函数式随机生成器:https://www.coursera.org/course/reactive 该类(class)基于 Scala,我正尝试在 FSharp 中
我需要为我的 F Sharp 记录修改和添加新属性。但随后它会为没有这个新字段的先前实例提供错误。我把它设置为 Nullable ,但仍然出现同样的错误,请帮我解决这个问题 最佳答案 我认为您的意思是
我刚刚真正进入 FSharp 并且我已经为此苦苦挣扎了很长一段时间,因为我不明白为什么我没有在比赛声明中得到预期的结果。 根据消息编号,我需要将数组(拆分)中的某些值与我想要返回的记录上的字段相匹配。
假设我正在使用如下列表: let items = [ Some(1); None; Some(8); ];; 只有Some的最短方法是什么?列表中的值? items |> List.filter Op
似乎必须覆盖 Equality 才能覆盖比较。 这是真的吗?我失踪有什么原因吗? 最佳答案 不。可以只进行自定义比较 [] [] type Node = | Data of string
由于 FSharp 中具有多个参数的函数会固有地变成只有一个参数的函数,Seq.filter 的签名应该不得不 Seq.filter predicate source ? 会有多不同 Seq.filt
是否等效/更好地工作 与 Event module在 Event type 或在 publish 上使用 Observable事件的属性 从功能上看,它似乎是等效的,我想区别在于“语义”: 我们是否在
我正在研究具有多个状态的 F# 代理,即使用“let rec/and”关键字组合(根据 Expert F# 3.0 的“消息处理和状态机”)来提供多个异步 block 。到目前为止我能找到的唯一例子是
我正在尝试使用 F# 生成随机三元组列表 -> 两个随机数及其总和: let foo minNum maxNum = let rnd = System.Random() let fir
我想以特定方式格式化元组,并且我尝试通过检查元组的类型(2 个元素、3 个元素等)来实现此目的。我在第三行收到错误消息: This runtime coercion of type test from
以下表达式是否会使用 fsharp 编译器生成任何代码? let xs = List.rev <| List.rev xs 最佳答案 不,事实并非如此。您可以查看 sharplab 上的输出 IL验证
这个问题已经有答案了: Ranges A to B where A > B in F# (5 个回答) 已关闭10 年前。 有没有一种方法可以按降序排列范围? 例如 [1..4] 评估为 > val
我想以特定方式格式化元组,并且我尝试通过检查元组的类型(2 个元素、3 个元素等)来实现此目的。我在第三行收到错误消息: This runtime coercion of type test from
以下表达式是否会使用 fsharp 编译器生成任何代码? let xs = List.rev <| List.rev xs 最佳答案 不,事实并非如此。您可以查看 sharplab 上的输出 IL验证
我是一名优秀的程序员,十分优秀!