-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Incomplete DefaultDllImportSearchPaths docs #3205
Copy link
Copy link
Open
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.SecurityIssues related to security practices for .NET developers.Issues related to security practices for .NET developers.cross-platformIndicates issues or PRs that relate to content applicable to both Framework and Core.Indicates issues or PRs that relate to content applicable to both Framework and Core.product-questionProduct usage related questionsProduct usage related questionswaiting-on-feedbackIndicates PRs that are waiting for feedback from SMEs before they can be mergedIndicates PRs that are waiting for feedback from SMEs before they can be merged
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.SecurityIssues related to security practices for .NET developers.Issues related to security practices for .NET developers.cross-platformIndicates issues or PRs that relate to content applicable to both Framework and Core.Indicates issues or PRs that relate to content applicable to both Framework and Core.product-questionProduct usage related questionsProduct usage related questionswaiting-on-feedbackIndicates PRs that are waiting for feedback from SMEs before they can be mergedIndicates PRs that are waiting for feedback from SMEs before they can be merged
https://github.com/dotnet/dotnet-api-docs/blob/8adb892bc4a3f45fdeaa24f716d2dbd4ba0365ab/xml/System.Runtime.InteropServices/DefaultDllImportSearchPathsAttribute.xml
.NET Core 3.0 will bring
DefaultDllImportSearchPathsAttribute, and the Roslyn analyzers will flag P/Invokes that lackDefaultDllImportSearchPathsAttributeby default. However, the documentation onDefaultDllImportSearchPathsAttributeis Windows-centric; it doesn't describe howDefaultDllImportSearchPathsAttributeworks on Linux, for example.This is a problem for code such at the following snippet taken from https://github.com/dotnet/corefx/blob/master/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.RAND.cs (with a constant replaced with a literal):
The options available for
DefaultDllImportSearchPathsAttributeare aimed at Windows, and the documentation doesn't make it clear how to handle this. Is the attribute completely ignored? Are only certain options available?