Skip to content

[Bug]: Having build error under .NET 10 runtime for iOS #168

@JimmyPun610

Description

@JimmyPun610

What happened?

I am upgrading my app to .NET 10, but when I try to built the iOS target, it is failed.

error IL2104: Assembly 'OneSignalSDK.DotNet.iOS' produced trim warnings

I have also tried with the latest package (6.1.2) but it has the same error.
I assume there is changes on trimming in .NET 10 as it used to work in .NET 9.

Thank you

Steps to reproduce?

1. Install OneSignal.Dotnet
2. Build for iOS (.NET 10)

What did you expect to happen?

The app should be built without error

Relevant log output

/Users/me/.nuget/packages/onesignalsdk.dotnet/5.2.2/lib/net7.0-ios11.0/OneSignalSDK.DotNet.iOS.dll : error IL2104: Assembly 'OneSignalSDK.DotNet.iOS' produced trim warnings. For more information see https://aka.ms/il2104 [/Users/me/Desktop/actions-runner/_work/MyApp-MAUI/MyApp-MAUI/MyApp.OneSignalNotificationServiceExtension/MyApp.OneSignalNotificationServiceExtension.csproj::TargetFramework=net10.0-ios]

Error: /Users/me/.nuget/packages/microsoft.net.illink.tasks/10.0.5/build/Microsoft.NET.ILLink.targets(103,5): error NETSDK1144: Optimizing assemblies for size failed. [/Users/me/Desktop/actions-runner/_work/MyApp-MAUI/MyApp-MAUI/MyApp.OneSignalNotificationServiceExtension/MyApp.OneSignalNotificationServiceExtension.csproj::TargetFramework=net10.0-ios]

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions