views:

639

answers:

2

How to do it? Is it possible to call a function from one F# code into C# without using a separated dll file or project?

+7  A: 

No. If you want to produce a single .exe you could use some of the f# static link options use the F# --full-help comandline switch of more details of these.

Robert
+10  A: 

You can't include two different languages in the same project, but you can merge them using ilmerge. To do this, put both projects in the same solution and reference the F# module as you would any dll. As part of your deployment script, run ilmerge to combine the exe file and dll file into a single exe file. See this Code Project article that details how to use ilmerge to create an exe.

Michael Meadows
F#'s static link switch so the same thing as ilmerge.
Robert