开发者

Distributing F# based libraries

I have a program written c# that references an assembly written in F#. If I want to distribute it, I need to include the FSharp.Core.dll assembly right? (Assuming the user didn't install F# already开发者_如何学Go)

Problem is, Visual Studio doesn't copy this dll (or any other related F# dlls) when I build my solution. How can I instruct it to copy the dll to the output folder?

Update: I'm currently just manually copying over the dlls for deployment. I was just wondering why this is needed at all.


In VS, if you right-click on the assembly reference to FSharp.Core in the C# project, select "properties", and change "Copy Local" to "True", then FSharp.Core.dll will be copied to the output directory.

(This is generally true for any DLL that's installed in the GAC on your development machine but which is not installed on the deployment machine.)


I don't know how to automate the distribution of FSharp.Core.dll, but you could try compiling with the --standalone flag to generate an assembly that runs on a PC without F# installed.

Compiler flags from MSDN.


With .net 4.0 there is an F# Runtime distribution. F# Runtime This is like the J# Runtime that used to ship separately.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜