ExcelDna and standalone F # installation

I downloaded the F # distribution kit (i.e. without installation) on Windows, and I had difficulty using ExcelDna with it.

When I copy the files FSharp.Core.dll and powerpack to the ExcelDna file directory (xxx.dna and xxx.xll) and use the code in the dna file (see below), it does not work (although there is no error message).

<DnaLibrary Name="FSharp Sample" Language="F#">
    <![CDATA[

    namespace Foo

    module Bar =

      open ExcelDna.Integration
      let sayhello () = "Hello from F#"

      [<ExcelFunction(Category="FSharp Functions", Description="FSharp function to add numbers")>]
      let add x y = x + y

      let rec factorial = function 
        | x when (x > 1.0) -> (floor x) * factorial (x - 1.0)
        | _ -> 1.0

    ]]>
</DnaLibrary>

However, it works with the DLL in the directory and uses the link to the F # -compiled library, as in:

<DnaLibrary>
    <ExternalLibrary Path="MyExcelDna.dll" />
</DnaLibrary>

Other languages ​​(C # and VB) work fine.

Has anyone used ExcelDna tools with the common F # distribution? Can anyone understand what might be wrong?

Many thanks for your help.

+3
source share
2 answers

Excel CodeDOM F #?

, , CodeDOM fsi.exe ( ). , . , , BinFolderOfDefaultFSharpCompiler CompilerLocationUntils.fs.

, fsharp-compiler-location app.config ( , ) .

FSharp.Compiler.CodeDom.dll CodePlex, , CodeDom ( ). (, , , CodePlex, )

+1

Source: https://habr.com/ru/post/1778708/


All Articles