Skip to content

Architecture-specific folders #16381

Open

Description

@valeriob

What is the correct way to create a c# project with native dependencies
image
and make them flow to other project that depend on it ?
We are able to do it in nuget placing assets in the runtimes/rid/folders, but what is the csporj equivalent ?

Thanks

Activity

  1. ghost added
    untriaged
    on Mar 16, 2021
  2. huoyaoyuan commented on Apr 6, 2021

    @huoyaoyuan
    Member

    I'd ran into this. PackageReference supports the rid specification, but ProjectReference doesn't. I had to workaround by creating a temporary nupkg.

  3. removed
    untriaged
    on Apr 14, 2021
  4. John0King commented on Feb 27, 2022

    @John0King

    I'm from dotnet/runtime#65420,
    I think we need some Item like <NativeBinaryReference Include="native.dll" Rid="win-x64" /> to implement this, this can be use to both genereate nuget package and also for project reference.

    Or , we should make the metadata PackagePath to be supported both on <PackageReference /> and <ProjectReference />.

  5. KiruyaMomochi commented on Apr 5, 2022

    @KiruyaMomochi

    From dotnet/runtime#65420 too.

    Now that both iOS and Android supports this NuGet convention. However, if I don't want to create a native package, I need to use AndroidNativeLibrary for Android, but NativeReference for iOS. When it comes to WebAssembly, NativeFileReferences is required. Furthermore, it looks like such an equivalent does not exist for Windows/Linux/macOS.

    Platform Item to Use
    iOS NativeReference
    Android AndroidNativeLibrary
    WebAssembly NativeFileReferences
    Others ???

    I really hope we have a unified item to cover all these differences.

    Please also see #19929.

  6. github-actions commented on May 27, 2026

    @github-actions
    Contributor

    Due to lack of recent activity, this issue has been labeled as 'Stale'. It will be closed if no further activity occurs within 14 more days. Any new comment will remove the label.

  7. taoyouh commented on May 27, 2026

    @taoyouh

    I think this is still a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions