Dynamic code execution on Ubuntu 24.04
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
When I tried to use Microsoft.ML library on my Ubuntu 24.04 I ended up with an exception:
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.PlatformNotSupportedException: Dynamic code generation is not supported on this platform.
at System.Reflection.Emit.AssemblyBuilder.ThrowDynamicCodeNotSupported()
at System.Reflection.Emit.AssemblyBuilder.EnsureDynamicCodeSupported()
at System.Reflection.Emit.DynamicMethod.Init(String name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] signature, Type owner, Module m, Boolean skipVisibility, Boolean transparentMethod)
at System.Reflection.Emit.DynamicMethod..ctor(String name, Type returnType, Type[] parameterTypes, Type owner, Boolean skipVisibility)
at Microsoft.ML.ApiUtils.GeneratePeek[TOwn,TRow,TValue](PropertyInfo propertyInfo, OpCode assignmentOpCode)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke[TArg1,TArg2,TResult](FuncStaticMethodInfo3`3 func, Type genArg1, Type genArg2, Type genArg3, TArg1 arg1, TArg2 arg2)
at Microsoft.ML.ApiUtils.GeneratePeek[TOwn,TRow](Column column)
at Microsoft.ML.Data.DataViewConstructionUtils.DataViewBase`1..ctor(IHostEnvironment env, String name, InternalSchemaDefinition schemaDefn)
at Microsoft.ML.Data.DataViewConstructionUtils.StreamingDataView`1..ctor(IHostEnvironment env, IEnumerable`1 data, InternalSchemaDefinition schemaDefn)
at Microsoft.ML.Data.DataViewConstructionUtils.CreateFromEnumerable[TRow](IHostEnvironment env, IEnumerable`1 data, SchemaDefinition schemaDefinition)
at Microsoft.ML.DataOperationsCatalog.LoadFromEnumerable[TRow](IEnumerable`1 data, SchemaDefinition schemaDefinition)
at Program.$(String[] args) in /home/ubuntu/Dev/AI/anomaly-detection.cs:line 19
ubuntu@ubuntu2
Any idea ?
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.