Skip to content

Automatically include .framework or .a files in the NuGet's runtimes/ios/native folder #11667

@mattleibow

Description

@mattleibow

Steps to Reproduce

  1. Create a NuGet package with assets in the runtimes/*/native folder (a .dll on win-x64, a .so on android-arm64 and a .framework in ios)
  2. Install the package into the various apps
  3. Observe the native files get included on Android (with an issue [One .NET] improve native library ABI detection at build time android#5432) and on Windows - but not on iOS

I see the PR that brings native bits into apps was merged: #11593. This fixes the ability to use native libs, but since all the other platforms automatically include the files under runtimes, this is a bit unexpected. (#11593)

There is the case where files may get greedily included by the build system, but this is not a big issue because the <PackageReference> element has the ExcludeAssets and IncludeAssets attribute that can be used to control this. (https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets)

Expected Behavior

The native framework /runtimes/ios/native/libSkiaSharp.framework is automatically included into the app.

Actual Behavior

The native framework was not included.

Environment

.NET 6.0

Build Logs

Example Project (If Possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetAn issue or pull request related to .NET (6)dotnet-pri0.NET 6: required for stable releaseenhancementThe issue or pull request is an enhancementiOSIssues affecting iOSmacOSIssues affecting macOS

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions