I built a factor in a C# project, it works well in c#
However, when I try to load it in F#,
// MyFactor is my C# Factor Class
let myFactor = Factors.createDelegate <@ MyFactor.Do(0.0) @> :?> FactorMethod<double, double>
let a = Variable<double>.Factor(myFactor, 1.1)
When I run, it gives me infer.CompilationFailedException, saying something that MyFactor.Do(double x) has no registered operators.
It seems that it cannot find the implementation of my factor.
I have already put [assembly: MicrosoftResearch.Infer.Factors.HasMessageFunctions]
into C# project.
Is there any other stuff I need to do to make a factor available in F#