You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
project TaxiFarePrediction.Console reference the project TaxiFarePrediction.Shared
STEP4 error happen
When I built and executed the project TaxiFarePrediction.Console , a problem happend at the code :
var predictionFunction = mlContext.Model.CreatePredictionEngine<TaxiTrip, TaxiTripFarePrediction>(model);
AND the error infomation shows:
System.Reflection.TargetInvocationException:“Exception has been thrown by the target of an invocation.”
PlatformNotSupportedException: Dynamic code generation is not supported on this platform.
System.Reflection.Emit.AssemblyBuilder.ThrowDynamicCodeNotSupported()
System.Reflection.Emit.AssemblyBuilder.EnsureDynamicCodeSupported()
System.Reflection.Emit.DynamicMethod.Init(string, System.Reflection.MethodAttributes, System.Reflection.CallingConventions, System.Type, System.Type[], System.Type, System.Reflection.Module, bool, bool)
System.Reflection.Emit.DynamicMethod.DynamicMethod(string, System.Type, System.Type[], System.Type, bool)
Microsoft.ML.ApiUtils.GeneratePeek<TOwn, TRow, TValue>(System.Reflection.FieldInfo, System.Reflection.Emit.OpCode)
System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(object, System.Span<object>, System.Reflection.BindingFlags)
otherwise, if I put all code files into the project TaxiFarePrediction.Console , the code would be smooth ;
SO, what's the problem about PlatformNotSupportedException , maybe my project structrue would cause some problem ?
The text was updated successfully, but these errors were encountered:
System information
STEP1
I created project [ TaxiFarePrediction.Console ] with net8.0 ;
it has codefile GlobalUsings.cs
created code file Program.cs
STEP2
Then I created a shared project [ TaxiFarePrediction.Shared ]
created code file CreateAndRunPrediction.cs which is almostly same as the codefile : https://github.com/dotnet/samples/tree/main/machine-learning/tutorials/TaxiFarePrediction/Program.cs
CreateAndRunPrediction.cs :
TaxiTrip.cs
STEP3
project TaxiFarePrediction.Console reference the project TaxiFarePrediction.Shared
STEP4 error happen
When I built and executed the project TaxiFarePrediction.Console , a problem happend at the code :
AND the error infomation shows:
otherwise, if I put all code files into the project TaxiFarePrediction.Console , the code would be smooth ;
SO, what's the problem about PlatformNotSupportedException , maybe my project structrue would cause some problem ?
The text was updated successfully, but these errors were encountered: