Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Native Library loading IOS Frameworks in .NET 10 #129798

Open

Description

Apple platform

iOS

Framework version

net10.0-*

Affected platform version

SDK 10.0.300, Manifest 36.1.69/10.0.100

Description

Previous issue on this: dotnet/macios#24266
Relevant issue: realm/realm-dotnet#3711

We're trying to update our app from .NET 8 to .NET 10 and encountering issues because our apps can no longer load their native libraries.

The breaking change is documented here: https://learn.microsoft.com/en-us/dotnet/core/compatibility/interop/10.0/native-library-search

I could be wrong, but it looks to be tracked back to this PR on dotnet/runtime: #115236

The breaking (no longer functional) code looks like this:

if (OperatingSystem.IsIOS())
 NativeLibrary.SetDllImportResolver(typeof(VeldridSpirvNative).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/veldrid-spirv.framework/veldrid-spirv", assembly, path));

With the suggested change being (as far as I understand):

if (OperatingSystem.IsIOS())
 NativeLibrary.SetDllImportResolver(typeof(VeldridSpirvNative).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/veldrid-spirv.framework/veldrid-spirv", assembly, path | DllImportSearchPath.ApplicationDirectory));

Before I go and update about 5 different projects and begin a cycle of dependency updates, I want to ask whether this is really intended behaviour?

Steps to Reproduce

I was going to provide some steps here, but I'm uncovering even more issues that makes this very annoying to create a reproduction for. It's just a question anyway.

Did you find any workaround?

As mentioned in the description.

Relevant logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /