Closed lpeixotoo closed 5 years ago
@OshoNot I have pushed a new version 2.5.6 that fix the above exception.
Unfortunately it fails now further ahead on some printf
usage. printf
uses reflection which is problematic.
https://dotnet.github.io/native/troubleshooter/method.html
Exception:
EETypeRva:0x01A3C438(System.Reflection.MissingRuntimeArtifactException): MakeGenericMethod() cannot create this generic method instantiation because the instantiation was not metadata-enabled: 'Microsoft.FSharp.Core.PrintfImpl.Specializations<Microsoft.FSharp.Core.Unit,System.String,System. String>.Final1
(System.String,Microsoft.FSharp.Core.FSharpFunc<System.String,System.String>,System.String)' For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616868 at nternal.Reflection.Core.Execution.ExecutionEnvironment.GetMethodInvoker(RuntimeTypeInfo, QMethodDefinition, RuntimeTypeInfo[], MemberInfo) + 0x15a at System.Reflection.Runtime.MethodInfos.NativeFormat.NativeFormatMethodCommon.GetUncached MethodInvoker(RuntimeTypeInfo[], MemberInfo) + 0x51 at System.Reflection.Runtime.MethodInfos.RuntimeMethodInfo.get_MethodInvoker() + 0xab at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.MakeGenericMethod(Type[])
- 0x121 at Microsoft.FSharp.Core.PrintfImpl.PrintfBuilder
3.buildPlainFinal(Object[], Type[]) + 0x271 at Microsoft.FSharp.Core.PrintfImpl.PrintfBuilder
3.BuildT + 0x42 at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey, Func
2) + 0x80 at Microsoft.FSharp.Core.PrintfImpl.Cache4.Get(PrintfFormat
4) + 0x6b at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenT + 0x1a at Suave.Utils.Collections.getFirst(FSharpList1, String) + 0x72 at <StartupCode$Suave>.$ConnectionFacade.processRequest@488-4.Invoke(String) + 0x38 at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a, b] (AsyncActivation
1, FSharpFunc`2, b) + 0x27
Hi @ademar ,
This is actually a CoreRT directive, one need to use the rd.xml
for reflection. I think this issue can be closed since once we add the rd.xml
file, everything runs ok.
Hi guys,
I've been trying to come up with a basic web server using Suave + CoreRT. Check this repo for source code and error analysis. When I start the generated executable, it yields the following exception: