Skip to content

Properly factor DllImports into Common\src\Interop #28035

@stephentoub

Description

@stephentoub

We now have a bunch of libraries with their own DllImports, whereas the expected approach is that all DllImports in product src should be included from src\Common\src\Interop, appropriately factored by platform and library, and then those source files included into the relevant assemblies that need them.

  • Microsoft.Diagnostics.Tracing.EventSource.Redist
  • System.Data.SqlClient
  • System.Diagnostics.EventLog
  • System.DirectoryServices
  • System.DirectoryServices.AccountManagement
  • System.DirectoryServices.Protocols
  • System.Drawing.Common
  • System.IO.Compression
  • System.IO.Compression.Brotli
  • System.IO.Ports
  • System.Management
  • System.Reflection.Metadata
  • System.Runtime.Caching
  • System.Security.Cryptography.Csp
  • System.Security.Cryptography.Pkcs
  • System.Security.Cryptography.X509Certificates

This all needs to be refactored and dedup'd.

https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/interop-guidelines.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-MetaenhancementProduct code improvement that does NOT require public API changes/additionsgood first issueIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributorstrackingThis issue is tracking the completion of other related issues.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions