Skip to content

Dynamic code execution on Ubuntu 24.04 #122087

@maurytam

Description

@maurytam

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, Span1 copyOfArgs, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 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](FuncStaticMethodInfo33 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.DataViewBase1..ctor(IHostEnvironment env, String name, InternalSchemaDefinition schemaDefn)
at Microsoft.ML.Data.DataViewConstructionUtils.StreamingDataView1..ctor(IHostEnvironment env, IEnumerable1 data, InternalSchemaDefinition schemaDefn)
at Microsoft.ML.Data.DataViewConstructionUtils.CreateFromEnumerable[TRow](IHostEnvironment env, IEnumerable1 data, SchemaDefinition schemaDefinition) at Microsoft.ML.DataOperationsCatalog.LoadFromEnumerable[TRow](IEnumerable1 data, SchemaDefinition schemaDefinition)
at Program.

$(String[] args) in /home/ubuntu/Dev/AI/anomaly-detection.cs:line 19
ubuntu@ubuntu2

Any idea ?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions