Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Cause
Built-in COM is not supported with Native AOT compilation. Use COM wrappers instead.
When the unsupported code path is reached at runtime, an exception will be thrown.
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
{
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.