Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Mono上的F#中签名dll时出现问题_F#_Mono_Assembly Signing - Fatal编程技术网

在Mono上的F#中签名dll时出现问题

在Mono上的F#中签名dll时出现问题,f#,mono,assembly-signing,F#,Mono,Assembly Signing,尝试在mono上的F#中对dll进行签名时出错: 没有生成dll,我返回此错误: Microsoft (R) F# 2.0 Compiler build 2.0.0.0 Copyright (c) Microsoft Corporation. All Rights Reserved.` error FS2014: A problem occurred writing the binary '': A call to StrongNameGetPublicKey failed (mscoree.

尝试在mono上的F#中对dll进行签名时出错:

没有生成dll,我返回此错误:

Microsoft (R) F# 2.0 Compiler build 2.0.0.0 Copyright (c) Microsoft Corporation. All Rights Reserved.`

error FS2014: A problem occurred writing the binary '': A call to StrongNameGetPublicKey failed (mscoree.dll)`
密钥文件是在Windows中生成的,这有什么区别吗

更新:

使用Mono 2.6.4

$ mono --version 

Mono JIT compiler version 2.6.4 (tarball Mon Jun 21 19:26:21 UTC 2010) 
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS:           __thread
GC:            Included Boehm (with typed GC and Parallel Mark)
SIGSEGV:       altstack
Notifications: epoll
Architecture:  amd64
Disabled:      none

看起来fsc正在调用本机Windows API,这是不可移植的。您可能应该向F#团队提出这个问题。

在生成程序集后尝试使用sn签名

要做到这一点,首先需要使用编译以生成延迟签名的程序集

然后,您可以使用带有-R标志的实用程序对程序集进行签名


我不能百分之百肯定这会起作用,因为我周围没有Linux或Mac机器来测试它。不过值得一试。

您使用的是哪个版本的Mono?(你可以通过mono--version找到)@Edgar,我已经在问题中添加了信息。我已经查看了,但无法确定如何对以前未签名的程序集进行签名。。。欢迎指点…我添加了更多信息。希望这能有所帮助。@Benjol:你听到什么了吗?@mmacaulay,不是真的,我想我收到一封“内部”邮件,说他们会设法调查此事。我怀疑它在微软和Mono之间的无人地带。。。但是如果我真的听到什么,我会在这里发帖。
$ mono --version 

Mono JIT compiler version 2.6.4 (tarball Mon Jun 21 19:26:21 UTC 2010) 
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS:           __thread
GC:            Included Boehm (with typed GC and Parallel Mark)
SIGSEGV:       altstack
Notifications: epoll
Architecture:  amd64
Disabled:      none