F# 核心库可以得到 SQLCLR 批准吗?
根据此线程, F# Core 必须经过 SQLCLR 批准才能将程序集标记为“安全”。这是有计划的吗?还可以做到吗?
According to this thread, F# Core must be SQLCLR-approved for assemblies to be marked SAFE
. Is this planned? Can it even be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信这是可以做到的。但是,F# 核心库是 Microsoft 的专有财产。这意味着您无法修改其代码并重新编译它以匹配和遵守 SQLCLR SAFE。我建议您使用 Microsoft 的 connect 网站向 Microsoft 添加建议。
Microsoft connect 位于:http://connect.microsoft.com(您必须注册并拥有实时电子邮件帐户.com 或 hotmail.com 注册前)。
要手动添加 .NET DLL 并将其集成到 SQL Server,您可以执行以下操作:
在此示例中,必须首先编译 F# 代码中的 DLL。我从 MSDN Library 链接中采取这一步:
http://msdn.microsoft.com/en- us/library/ms254956(v=vs.80).aspx
只是不要忘记将 PERMISSION_SET = SAFE 添加到 CREATE ASSEMBLY 命令中。
以下是我从上面链接中引用的步骤:
编辑:根据下面的评论者,他关于 F# 现在开源的说法是正确的!您可以修改并重新编译它以满足您的需要。
编辑:添加有关如何将 DLL 集成到 SQL Server CLR 集成的更多详细指南。
I believe it can be done. However, F# core library is the sole property of Microsoft. This means you can't modify its code and recompile it to match and comply with SQLCLR SAFE. I suggest you add suggestion to Microsoft using Microsoft's connect website.
Microsoft connect is at: http://connect.microsoft.com (you have to register and have email account on live.com or hotmail.com before register).
To manually add your .NET DLL and integrate it to SQL Server, you can do this:
In this example, the DLL from your F# code has to be compiled first. I take this step from MSDN Library link:
http://msdn.microsoft.com/en-us/library/ms254956(v=vs.80).aspx
Just don't forget to add PERMISSION_SET = SAFE to the CREATE ASSEMBLY command.
Here are the steps I quote from above link:
Edit: based on the commenter below, he's right about F# is now open source! You can modify and recompile it to suit your needs.
Edit: adding more detail guide on how to integrate the DLL to SQL Server CLR integration.
尽管令人讨厌,但有一个技巧是使用 fsc(又名 F# 编译器)的 --standalone 标志。甚至可以将其添加到项目设置中,并将 F# 运行时库(以及所有其他被视为可嵌入的依赖项)嵌入到输出工件中。我相信到那时您应该能够通过将程序集标记为 SQLCLR 安全来完全执行您想要的操作。
A trick, as nasty as it is, would be using the --standalone flag of fsc (aka the F# compiler). This can even be added in the project settings and embeds in the output artifact the F# runtime library (along with all other dependencies deemed embeddable). I believe that at that point you should be able to do exactly what you want just by marking your assembly as SQLCLR safe.