IL3052: COM-interop wordt niet ondersteund met volledige compilatie van tevoren

Oorzaak

Ingebouwde COM wordt niet ondersteund met systeemeigen AOT-compilatie. Gebruik in plaats daarvan COM-wrappers .

Wanneer het niet-ondersteunde codepad tijdens runtime wordt bereikt, wordt er een uitzondering gegenereerd.

Example

using System.Runtime.InteropServices;

// AOT analysis warning IL3052: CorRuntimeHost.CorRuntimeHost(): COM interop is not supported
// with full ahead of time compilation.
new CorRuntimeHost();

[Guid("CB2F6723-AB3A-11D2-9C40-00C04FA30A3E")]
[ComImport]
[ClassInterface(ClassInterfaceType.None)]
public class CorRuntimeHost
{
}