<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0-preview.6.22324.4" />

LibraryImportAttribute

Attribute used to indicate a source generator should create a function for marshalling arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time.
public string EntryPoint { get; set; }

Gets or sets the name of the entry point to be called.

public string LibraryName { get; }

Gets the name of the library containing the import.

public bool SetLastError { get; set; }

Gets or sets whether the callee sets an error (SetLastError on Windows or errno on other platforms) before returning from the attributed method.

public StringMarshalling StringMarshalling { get; set; }

Gets or sets how to marshal string arguments to the method.

public Type StringMarshallingCustomType { get; set; }

Gets or sets the Type used to control how string arguments to the method are marshalled.

public LibraryImportAttribute(string libraryName)

Initializes a new instance of the LibraryImportAttribute.