dotnet / dotnet/smartcomponents

Build Failure on Mac Catalyst and iOS with SmartComponents.LocalEmbeddings in .NET MAUI Blazor App

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
508
Forks
61
PR merge metrics
No merged PRs in 30d

Description

**Description:**

When a .NET MAUI Blazor application includes the `SmartComponents.LocalEmbeddings` NuGet package, the project fails to build specifically for the **Mac Catalyst** and **iOS** target frameworks. The build completes successfully for **Windows** and **Android**, but fails on macOS with the following error:

No matching framework found

However, updating the `Microsoft.ML.OnnxRuntime` package to the latest version (`1.22.1`) resolves the issue, allowing the project to build successfully across all platforms.

Image

[BlazorMAUI.zip](https://github.com/user-attachments/files/22292612/BlazorMAUI.zip)
---

**Steps to Reproduce:**

> 1. Create a new .NET MAUI Blazor project.
> 2. Add the `SmartComponents.LocalEmbeddings` NuGet package.
> 3. Attempt to build the project targeting `net8.0-ios` or `net8.0-maccatalyst`.
> 4. Observe the build failure.


(or)

> 1. Download the attached .NET MAUI Blazor project. [BlazorMAUI.zip](https://github.com/user-attachments/files/22292612/BlazorMAUI.zip)
> 2. Attempt to build the project targeting `net8.0-ios` or `net8.0-maccatalyst`.
> 3. Observe the build failure.

---

**Expected Behavior:**

The project should build successfully for all target platforms, including Mac Catalyst and iOS.

---

**Actual Behavior:**

Build fails on Mac Catalyst and iOS with a framework mismatch error.

---

**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.21.0` (fails), `1.22.1` (works)

---

**Workaround:**

Manually updating the `Microsoft.ML.OnnxRuntime` package to version `1.22.1` resolves the build issue.

```xml

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.