-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Description
When a .NET MAUI Blazor application includes the SmartComponents.LocalEmbeddings and Microsoft.ML.OnnxRuntime, the project throws an exception in intialization phase of LocalEmbedder localEmbedder = new LocalEmbedder(); in Mac Catalyst framework.
Have also tried placing the libonnxruntime.dylib in monobundle folder manually but still facing the mentioned exception. The version used for Microsoft.ML.OnnxRuntime is 1.22.1.
Steps to Reproduce:
- Create a new .NET MAUI Blazor project.
- Add the
SmartComponents.LocalEmbeddingsandMicrosoft.ML.OnnxRuntimeNuGet package. - Set the target to net8.0-ios or net8.0-maccatalyst.
- Create a onclick function in which initialze LocalEmbedder().
- Exception is getting thrown.
or
- Download the attached .NET MAUI Blazor project. BlazorMAUI.zip
- Run the sample.
- Click the Initialize Local Embeddings button
- Exception is getting thrown.
Expected Behavior:
During OnClick Event the initialization of LocalEmbedder() should take place correctly
Actual Behavior:
Initialization fails on Mac Catalyst throwing exception of The type initializer for "Microsoft.ML.OnnxRuntime.NativeMethods" threw an exception
Environment:
- .NET SDK: 8.0.203
- MAUI Version: 8.0.x
- macOS: macOS Sequoia 15.6
- Target Frameworks: net8.0-ios, net8.0-maccatalyst
- Device: Simulator and Physical Device
- SmartComponents.LocalEmbeddings Version: 0.1.0-preview10148
- Microsoft.ML.OnnxRuntime Version: 1.22.1
KameshRajendran and adamhathcock
Metadata
Metadata
Assignees
Labels
No labels