HS.
HS.

Reputation: 15710

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)

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.

Upvotes: 5

Views: 559

Answers (3)

Steve Severance
Steve Severance

Reputation: 6646

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

Upvotes: 1

Brian
Brian

Reputation: 118865

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.)

Upvotes: 9

cfern
cfern

Reputation: 6006

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.

Upvotes: 4

Related Questions