I'm trying to follow the sample project for using Excel-DNA Registration Helpers for F Sharp. In particular, I'm interested in the sample for using optional arguments.
I've built the sample project (using Visual Studio 2015), but when I load the resulting Xll into Excel 2010 I receive the error
Registration [Error] Method not registered due to unsupported signature: 'Func`4.Invoke' : DnaMarshalException - Unknown Data Type: Microsoft.FSharp.Core.FSharpOption`1[System.Double]
in the diagnostics window, and the function dnaFSharpOptional
is unavailable in Excel. It's as if the parameter conversion FsParameterConversions.FsOptionalParameterConversion
is not being applied or is not working as intended.
Any ideas of the source of the error, and how to fix it?
N.B.
- As I'm only building the sample project, and not the whole Excel-DNA Registration solution, I had to change some of the project references (namely ExcelDna.Registration, ExcelDna.Registration.FSharp) to point to pre-built assemblies from nuget. But I don't imagine this would make a difference.
- The sample project references Excel 2013 in the project Debug settings but I'm using Excel 2010.
- The other example functions in the project (i.e. the Async functions) are available, so it's not a case of registration failing generally - it's something specific to the optional arguments.