call F# dll in C#

后端 未结 3 2075
不知归路
不知归路 2021-02-09 13:30

How can I create F# dll and call it in C#? Thank you

相关标签:
3条回答
  • 2021-02-09 14:09

    If you are using the latest version, all you should need to do is set the project type to 'F# Library' when you create the project.

    0 讨论(0)
  • 2021-02-09 14:15

    To create a DLL in F#, you should set the output type to class library in project properties. Use Add Reference dialog as mentioned before to add the reference in your C# project.

    0 讨论(0)
  • 2021-02-09 14:22

    There's no real trick; like

    http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!307.entry

    only the other way around. One thing to note is that if you don't specify a namespace in the F# code, all your top-level definitions by default end up in a module with the name of the file, so if you have Program.fs then you may reference Program.Whatever from C#.

    0 讨论(0)
提交回复
热议问题