I am currently working on a project to implementing mutation-testing for F#. To access the FCS process I am using the FSharp.Compiler.Service package.
I am having some trouble with the compilation process and the compiled DLL.
I'm using FSharp.Compiler.Service to compile a project's AST's to
a dll. Another program references this dll. When compiled in visual studio everything works. When compiled from the AST's using compiler services I get method not found exceptions on every call.
an executable dll. However I always get the error entrypoint is not the last declaration. When inspecting what I pass to the compilation the entrypoint AST is the last AST in the list, and the entrypoint node is the last node in the AST. When compiling in visual studio there are no issues.
Has anyone encountered these issues before? Or knows a way to fix the errors I’m getting?
private (bool, FSharpErrorInfo[]) TryCompilation(FSharpChecker checker, FSharpList<ParsedInput> trees, List<string> pathlist, FSharpList<string> dependencies , List<string> pdblist) { Tuple<FSharpErrorInfo[], int> result = FSharpAsync.RunSynchronously( checker.Compile( trees, AssemblyName, pathlist.First(), dependencies, null, true, rue, null), null, null); return (result.Item2 == 0, result.Item1); }
I've tried it with pdb but that doesn't seem to make a difference – Homeward