dotnet / dotnet/docs

Add more information about the `runtimes` folder.

Open
#34,916 0 comments 1 reaction 0 assignees View on GitHub
:watch: Not Triaged dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

In NuGet packages, it is possible to put libraries for different architectures by placing them into a `runtimes` folder.
Documentation about that is here, under the Architecture specific folders section: https://learn.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks#architecture-specific-folders

Here is a good example of a package doing so: https://www.nuget.org/packages/Libuv

When publishing an application as multi-platform and framework dependent, and with pinvoke, the pinvoke will find the right lib to use under the right subfolder of `runtimes`.

The documentation does not tell anything about that behavior and the way DllImport seeks for the right architecture under the `runtimes` subfolders.

Can you add that in the documentation?

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 28b4e055-ad4c-cd47-079f-495fdaf0d60c
* Version Independent ID: 5b5aab0f-6879-c6a2-21b5-252819f82272
* Content: [Cross Platform P/Invoke](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/cross-platform)
* Content Source: [docs/standard/native-interop/cross-platform.md](https://github.com/dotnet/docs/blob/main/docs/standard/native-interop/cross-platform.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @saul
* Microsoft Alias: **jekoritz**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.